diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2016-11-03 00:51:34 +0100 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2016-12-19 02:07:03 +0100 |
commit | cbc8638c38bccd4ac7b787ac4d79de4bf2b6a0a0 (patch) | |
tree | ec976a0dafcfef8dbadb89621220932f15e93cdc /test | |
parent | 5d79c6466386862e70ce276a094c1897112b7491 (diff) | |
download | jquery-cbc8638c38bccd4ac7b787ac4d79de4bf2b6a0a0.tar.gz jquery-cbc8638c38bccd4ac7b787ac4d79de4bf2b6a0a0.zip |
Build: ESLint setup improvements
1. Use the short name of the preset in the config.
2. Run ESLint first on non-minified files.
3. Explicitly specify environments in every config file (those settings cascade
which means we've been assuming a Node.js environment where we shouldn't have).
Diffstat (limited to 'test')
-rw-r--r-- | test/.eslintrc.json | 20 | ||||
-rw-r--r-- | test/node_smoke_tests/.eslintrc.json | 12 | ||||
-rw-r--r-- | test/promises_aplus_adapters/.eslintrc.json | 5 |
3 files changed, 24 insertions, 13 deletions
diff --git a/test/.eslintrc.json b/test/.eslintrc.json index 744de89ec..8cc2adc96 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -1,13 +1,15 @@ { + "root": true, + + "extends": "../.eslintrc-browser.json", + "env": { + + // In source the browser env is not enabled but unit tests rely on them + // too much and we don't run them in non-browser environments anyway. "browser": true }, - // 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 - }, + "globals": { "require": false, "define": false, @@ -41,17 +43,19 @@ "baseURL": true, "externalHost": true }, + "rules": { // See https://github.com/eslint/eslint/issues/2342 "no-unused-vars": "off", - // Too much errors + // Too many errors "max-len": "off", "brace-style": "off", "key-spacing": "off", "camelcase": "off", + "strict": "off", - // Not really too much - waiting autofix features for these rules + // Not really too many - waiting for autofix features for these rules "lines-around-comment": "off", "dot-notation": "off" } diff --git a/test/node_smoke_tests/.eslintrc.json b/test/node_smoke_tests/.eslintrc.json index 0877d24af..91ec5ba4e 100644 --- a/test/node_smoke_tests/.eslintrc.json +++ b/test/node_smoke_tests/.eslintrc.json @@ -1,7 +1,13 @@ { + "root": true, + + "extends": "../../.eslintrc-node.json", + + "parserOptions": { + "ecmaVersion": 2015 + }, + "env": { "es6": true - }, - "extends" : "../../.eslintrc.json", - "root": true + } } diff --git a/test/promises_aplus_adapters/.eslintrc.json b/test/promises_aplus_adapters/.eslintrc.json index d11775710..f961645e5 100644 --- a/test/promises_aplus_adapters/.eslintrc.json +++ b/test/promises_aplus_adapters/.eslintrc.json @@ -1,4 +1,5 @@ { - "extends": "../../.eslintrc.json", - "root": true + "root": true, + + "extends": "../../.eslintrc-node.json" } |