.jshintrc globals are ignored

Hey all,

i am working in project that uses jshint and jscs. Both seem to work fine but no matter how i configure jshint via a .jshintrc file in the projects root folder the globals sections is ignored.

Please find attached the .jshintrc configuration. I think i am using the latest version of phpstorm (8.0.3) on an ubuntu linux.

    "browser": true,
    "devel": true,
    "jquery": true,
    "jasmine": true,
    "globals": {
        "angular": false,
        "_": false
    
},

    "globalstrict": true,
    "latedef": true,
    "asi": false,
    "boss": false,
    "eqeqeq": true,
    "eqnull": true,

    "evil": false,
    "multistr": false,
    "freeze": true,
    "newcap": true,
    "indent": 4,
    "curly": true,
    "trailing": true,
    "immed": true,

    "nonbsp": true,
    "bitwise": true,
    "noarg": true,
    "noempty": true,
    "undef": true,
    "unused": true,
    "strict": true,
    "sub": true,
    "maxparams": 5,
    "predef": [
        "has",
        "load",
        "define",
        "require",
        "it",
        "describe",
        "assert",
        "package",
        "short"
    
]
}


Can someone help me with this? I don't want to add /* globals ...*/ comments all the time to see if there are any issues.

THX
Stefan

2 comments
Comment actions Permalink

You have both 'globals' and 'predef' defined. They mean the same, but the latter is deprecated. Seems if both exist the one defined last 'wins'.  Please  remove predef property from you config - does it help?

0
Comment actions Permalink

Hi Elena,

thanks a lot, that solved the problem.

Cheers
Stefan

0

Please sign in to leave a comment.