Search code examples
phpstormjshint

PhpStorm can't configure JSHint


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
}

Solution

  • 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