jquery/.eslintrc-browser.json
Michał Gołębiowski-Owczarek 0fdfdd8290 Build: Enable ESLint one-var rule for var declarations in browser code
Node.js code is written more & more commonly in ES6+ so it doesn't make sense
to enable it there. There are many violations in test code so it's disabled
there as well.

Closes gh-4615

(cherry picked from commit 4a7fc8544e)
2020-03-02 22:30:00 +01:00

31 lines
692 B
JSON

{
"root": true,
"extends": "jquery",
// Support: IE <=9 only, Android <=4.0 only
// The above browsers are failing a lot of tests in the ES5
// test suite at http://test262.ecmascript.org.
"parserOptions": {
"ecmaVersion": 3
},
// The browser env is not enabled on purpose so that code takes
// all browser-only globals from window instead of assuming
// they're available as globals. This makes it possible to use
// jQuery with tools like jsdom which provide a custom window
// implementation.
"env": {},
"globals": {
"window": true,
"define": true,
"module": true
},
"rules": {
"one-var": ["error", {"var": "always"}],
"strict": ["error", "function"]
}
}