standard / eslint-config-standard

ESLint Config for JavaScript Standard Style
https://standardjs.com
MIT License
2.61k stars 564 forks source link

Error while loading rule 'spaced-comment' #3

Closed larsthorup closed 9 years ago

larsthorup commented 9 years ago

I just upgraded from 3.3.0 to 3.4.0 and now get this error:

TypeError: Error while loading rule 'spaced-comment': Cannot read property 'length' of undefined at module.exports (C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\rules\spaced-comment.js:26:28) at C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\eslint.js:629:32 at Array.forEach (native) at EventEmitter.module.exports.api.verify (C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\eslint.js:620:16) at processText (C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\cli-engine.js:200:27) at processFile (C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\cli-engine.js:225:12) at C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\cli-engine.js:317:26 at walk (C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\util\traverse.js:81:9) at C:\r\larsthorup\amaze\node_modules\semistandard\node_modules\standard-engine\node_modules\eslint\lib\util\traverse.js:102:9 at Array.forEach (native)

feross commented 9 years ago

Try updating your version of eslint to 0.24.0. I think that the spaced-comment rule was added in 0.24.0. Let me know if that fixes your issue.

feross commented 9 years ago

Oh, it looks like you're using semistandard. I just noticed that. You should probably open an issue on the semistandard repo. I think this is happening because semistandard depends on a version of eslint older than 0.24.

cc @Flet, who's the maintainer

larsthorup commented 9 years ago

Thanks, I've created: https://github.com/Flet/semistandard/issues/20