ESLint will never say "severity is not defined" (if you search the code base, you'll see this error message doesn't exist), so the only thing I can think to recommend is that your wrapper is throwing an error.
ESLint is made to be used only with Node.js, so I'm afraid there's not much further advise I can offer. On Mon, May 4, 2015 at 6:15 AM, Ilya Dachkovsky <[email protected]> wrote: > Hi everyone, > > I am trying to update ESLint version for a web based IDE. Currently the > IDE uses ESLint version 0.9 and the upgrade is going to update it to ESLint > 0.17.0. But unfortunately, I stumbled upon some problems which is web IDE > is not being able to load rules in options menu (versions 18, 19 and 20 > also were tested and failed as well). And then an error appears, saying > "severity is not defined". This is the first update since version 0.9, so I > have a suspicion a lot was changed since then and there might be a need to > change the way default rules are configured in json file. > > Now to the explanation of what is done with ESLint. I know I should build > eslint.js file using npm ("npm test" in command line, I also tried to run > "npm run browserify" a few times, although previously it worked fine > without it). I also create default rules json file (if there is a need to > take a loot at the entire jason file with rules configuration, I can upload > it on dropbox later, just ask) which is used to upload rules and their > configurations to web IDE. The rules used in every specific version are > found in eslint.js file itself by searching it for "rules" and copying > all the rules mentioned there. > > And the json begins with the following code: > > "eslintConfig": { > "env" : { > "browser" : false, //(also tried to switch it to true out of curiosity - > didn't help) > "node" : false, > "amd" : false, > "mocha" : false > }, > // global variables with keys as names and a boolean value to determine if > they are assignable > "globals" : { > // CouchDB globals > "require" : false, > more globals... > > then rules and rulesExt go. > > In the latter all rules for now are switched off like this: > "rules": { > "no-alert": 0, > etc... > > and after that all rules are mentioned and switched off, they are defined > as info like that: > "rulesExt": { > "no-alert" : { > "severity" : "info", > "category" : "Stylistic Issue" > }, > more rules... > > > > Web IDE has a Java wrapper to execute ESLint without Node.js, in other > words in browser in our case. > > ESLint 0.9 still works perfectly with this kind of rules settings, but > lately all manual tests with version 17 (and 19, 20 as well) started to > fail with "severity is not defined" error. That is why I think the > problem is in json configuration file. Or, probably, I didn't build > eslint.js correctly. Anyway, I am not sure what exactly is wrong and will > be grateful for your tips and suggestions where to look for the source of > the problem. > > Many thanks in advance, > > Ilya > > > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "ESLint" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- ______________________________ Nicholas C. Zakas @slicknet Author, Professional JavaScript for Web Developers Buy it at Amazon.com: http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3 -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
