CLOSED: PEBKAC: ESlint now broken? HALP!


  • SockDev

    so setting up a new box for dev work as i'm decommissionaing an older far more expensive vps that i had slapped my dev environment onto (it was a bit underutilized)

    and now this:

    accalia@SockBotDev:~/SockBot$ sudo npm install -g eslint
    /usr/bin/eslint -> /usr/lib/node_modules/eslint/bin/eslint.js
    eslint@0.10.0 /usr/lib/node_modules/eslint
    ├── object-assign@1.0.0
    ├── xml-escape@1.0.0
    ├── user-home@1.1.0
    ├── strip-json-comments@1.0.2
    ├── estraverse@1.5.1
    ├── escope@1.0.1
    ├── text-table@0.2.0
    ├── debug@2.1.0 (ms@0.6.2)
    ├── minimatch@1.0.0 (sigmund@1.0.0, lru-cache@2.5.0)
    ├── mkdirp@0.5.0 (minimist@0.0.8)
    ├── optionator@0.4.0 (type-check@0.3.1, deep-is@0.1.3, levn@0.2.5, prelude-ls@1.1.1, wordwrap@0.0.2, fast-levenshtein@1.0.4)
    ├── chalk@0.5.1 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
    ├── concat-stream@1.4.7 (inherits@2.0.1, typedarray@0.0.6, readable-stream@1.1.13)
    ├── doctrine@0.6.2 (esutils@1.1.6)
    ├── esprima@1.2.2
    └── js-yaml@3.2.3 (esprima@1.0.4, argparse@0.1.15)
    accalia@SockBotDev:~/SockBot$ eslint SockBot.js 
    
    /usr/lib/node_modules/eslint/lib/eslint.js:569
                        throw new Error("Definition for rule '" + key + "' was not
                              ^
    Error: Definition for rule 'space-unary-word-ops' was not found.
        at /usr/lib/node_modules/eslint/lib/eslint.js:569:27
        at Array.forEach (native)
        at EventEmitter.module.exports.api.verify (/usr/lib/node_modules/eslint/lib/eslint.js:545:16)
        at processFile (/usr/lib/node_modules/eslint/lib/cli-engine.js:134:27)
        at /usr/lib/node_modules/eslint/lib/cli-engine.js:230:26
        at walk (/usr/lib/node_modules/eslint/lib/util/traverse.js:81:9)
        at /usr/lib/node_modules/eslint/lib/util/traverse.js:102:9
        at Array.forEach (native)
        at traverse (/usr/lib/node_modules/eslint/lib/util/traverse.js:101:11)
        at CLIEngine.executeOnFiles (/usr/lib/node_modules/eslint/lib/cli-engine.js:221:9)
    accalia@SockBotDev:~/SockBot$ 
    

    .... okay.... now what?

    @Yamikuronue i blame you for introducing me to ESlint in the first place! (also please help? ;-))


  • I survived the hour long Uno hand

    What's your config file? Some of the rules got renamed between my first setting up a config file and my revisiting it today.

    Looking at the rules, I see "space-unary-ops" is probably what you wanted there.


  • SockDev

    {
      "env": {
        "node": true
      },
      "rules": {
        "block-scoped-var": 2,
        "brace-style": [2, "1tbs"],
        "camelcase": 1,
        "complexity": [1,],
        "curly": 2,
        "eol-last": 2,
        "eqeqeq": [2, "smart"],
        "max-depth": [1, 3],
        "max-statements": [1, 15],
        "max-len": [1, 80],
        "new-cap": 1,
        "no-extend-native": 2,
        "no-mixed-spaces-and-tabs": 2,
        "no-trailing-spaces": 2,
        "no-use-before-define": [2, "nofunc"],
        "no-unused-vars": 1,
        "quotes": [2, "single", "avoid-escape"],
        "semi": [2, "always"],
        "space-after-keywords": [2, "always"],
        "space-in-brackets": [2, "never"],
        "space-unary-word-ops": 2
      }
    }
    

    ok well that makes sense... when did they change the name of that rule and what did they change it to then?

    also why? that rc file is only like a month old!


  • I survived the hour long Uno hand

    Changelog: http://eslint.org/blog/

    I think you can also instruct npm to install a specific version, to avoid this headache in the future

    Looking over the list, I'm not sure "space-unary-word-ops" was EVER right? Are you sure it was working?


  • SockDev

    that did it.

    I'm not sure i want to version lock eslint, i want the bugfixes... hmm... must think.

    i do look forward to when nodeJS gets full ES6 support so i can start using all that awesome goodness.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.