JSHint Error: "E001 - Bad Option"

I am working on some ES6 JavaScript code, and linter-jshint continues to throw this error.

Error E001 Bad Option

I tried to see all the JSHint Parameters . First I added {"esversion": 6} to the .jshintrc file in my user directory. This happened when an error began to appear. Then I tried moving to the deprecated {"esnext": true} . The error just changed to another, so I returned.

This option should work, I don’t understand why it shows this error. This is a valid option, isn't it?

By the way, I use Atom.

+5
source share
3 answers

Here is my working .jshintrc file, I had the wrong property error giving the same message:

 { "predef": [ "$", "jQuery", "text", "$p", "window", "document", "console", "parent" ], "curly": true, "eqeqeq": true, "funcscope": true, "futurehostile": true, "latedef": true, "nonbsp": true, "notypeof": true, "shadow": "outer", "singleGroups": true, "undef": true, "unused": true, "debug": true, "scripturl": true, "-W079": true } 

Something useful. If you Ctrl + Alt + Cmd + L (on Mac) Atom reboots and takes into account the latest changes.

0
source

Check package.json .

Came across this error because package.json had:

 { jshintConfig": { "extends": "./node_modules/jsgreat/es6/.jshintrc" } } 

Which is unacceptable, extends can only be used in a .jshintrc file.

0
source

I had one line with

 // jshint ignore:line //and wanted to add some more information in the comment 

deleting the additional comment fixed the error.

0
source

Source: https://habr.com/ru/post/1236632/


All Articles