Warm tip: This article is reproduced from stackoverflow.com, please click
phpstorm jshint

PhpStorm can't configure JSHint

发布于 2020-03-31 22:59:41

enter image description here

Can't figure out how to change .jshintrc file to make JSHint see variables inside window object without adding 'window'.

.jshintrc

"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"undef": true,
"unused": true,
"node": true,

"evil": true,
"sub": true,
"esversion": 6,

"globals": {
    "window": true,
    "JSON": false,

    "jQuery": true,
    "define": false,
    "module": false,
    "noGlobal": true
}
Questioner
barmaxon
Viewed
46
lena 2020-01-31 20:37

There is no way to set up JSHint to accept variables created in window object. Please see https://github.com/jshint/jshint/issues/2555#issuecomment-122302652 for possible workaround