From: Oleg Gaidarenko Date: Fri, 29 Jul 2016 19:18:58 +0000 (+0300) Subject: Build: .eslintrc -> .eslintrc.json X-Git-Tag: 3.1.1~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6acf4a79467a5aea5bc1eb7d552d72366718635d;p=jquery.git Build: .eslintrc -> .eslintrc.json `.eslintrc` format is deprecated - http://eslint.org/docs/user-guide/configuring#configuration-file-formats Fixes gh-3248 Closes gh-3247 --- diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 6dcb6353a..000000000 --- a/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "eslint-config-jquery", - "root": true, - "env": { - "node": true - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..6dcb6353a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,7 @@ +{ + "extends": "eslint-config-jquery", + "root": true, + "env": { + "node": true + } +} diff --git a/dist/.eslintrc b/dist/.eslintrc deleted file mode 100644 index ac4ec2fef..000000000 --- a/dist/.eslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../src/.eslintrc", - "rules": { - // That is okay for the built version - "no-multiple-empty-lines": "off", - - // Because sizze is not compatible to jquery code style - "no-nested-ternary": "off", - "no-unused-expressions": "off", - "lines-around-comment": "off", - "space-in-parens": "off", - "camelcase": "off", - "computed-property-spacing": "off", - "max-len": "off", - "dot-notation": "off", - "semi-spacing": "off", - "brace-style": "off" - } -} diff --git a/dist/.eslintrc.json b/dist/.eslintrc.json new file mode 100644 index 000000000..b99e682f4 --- /dev/null +++ b/dist/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "extends": "../src/.eslintrc.json", + "rules": { + // That is okay for the built version + "no-multiple-empty-lines": "off", + + // Because sizze is not compatible to jquery code style + "no-nested-ternary": "off", + "no-unused-expressions": "off", + "lines-around-comment": "off", + "space-in-parens": "off", + "camelcase": "off", + "computed-property-spacing": "off", + "max-len": "off", + "dot-notation": "off", + "semi-spacing": "off", + "brace-style": "off" + } +} diff --git a/src/.eslintrc b/src/.eslintrc deleted file mode 100644 index dbf16c584..000000000 --- a/src/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - // 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": { - "window": true, - "jQuery": true, - "define": true, - "module": true, - "noGlobal": true - }, - "rules": { - "strict": ["error", "function"] - } -} diff --git a/src/.eslintrc.json b/src/.eslintrc.json new file mode 100644 index 000000000..dbf16c584 --- /dev/null +++ b/src/.eslintrc.json @@ -0,0 +1,18 @@ +{ + // 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": { + "window": true, + "jQuery": true, + "define": true, + "module": true, + "noGlobal": true + }, + "rules": { + "strict": ["error", "function"] + } +} diff --git a/src/core.js b/src/core.js index 68ba9a5c2..f3983b4a8 100644 --- a/src/core.js +++ b/src/core.js @@ -1,5 +1,5 @@ /* global Symbol */ -// Defining this global in .eslintrc would create a danger of using the global +// Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module define( [ diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 744de89ec..000000000 --- a/test/.eslintrc +++ /dev/null @@ -1,58 +0,0 @@ -{ - "env": { - "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, - "DOMParser": false, - "JSON": false, - "Promise": false, - "Symbol": false, - "QUnit": false, - "ajaxTest": false, - "testIframe": false, - "testIframeWithCallback": false, - "iframeCallback": true, - "createDashboardXML": false, - "createXMLFragment": false, - "moduleTeardown": false, - "testFoo": false, - "url": false, - "t": false, - "q": false, - "jQuery": true, - "sinon": true, - "amdDefined": true, - "fireNative": true, - "Globals": true, - "hasPHP": true, - "isLocal": true, - "supportjQuery": true, - "originaljQuery": true, - "$": true, - "original$": true, - "baseURL": true, - "externalHost": true - }, - "rules": { - // See https://github.com/eslint/eslint/issues/2342 - "no-unused-vars": "off", - - // Too much errors - "max-len": "off", - "brace-style": "off", - "key-spacing": "off", - "camelcase": "off", - - // Not really too much - waiting autofix features for these rules - "lines-around-comment": "off", - "dot-notation": "off" - } -} diff --git a/test/.eslintrc.json b/test/.eslintrc.json new file mode 100644 index 000000000..744de89ec --- /dev/null +++ b/test/.eslintrc.json @@ -0,0 +1,58 @@ +{ + "env": { + "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, + "DOMParser": false, + "JSON": false, + "Promise": false, + "Symbol": false, + "QUnit": false, + "ajaxTest": false, + "testIframe": false, + "testIframeWithCallback": false, + "iframeCallback": true, + "createDashboardXML": false, + "createXMLFragment": false, + "moduleTeardown": false, + "testFoo": false, + "url": false, + "t": false, + "q": false, + "jQuery": true, + "sinon": true, + "amdDefined": true, + "fireNative": true, + "Globals": true, + "hasPHP": true, + "isLocal": true, + "supportjQuery": true, + "originaljQuery": true, + "$": true, + "original$": true, + "baseURL": true, + "externalHost": true + }, + "rules": { + // See https://github.com/eslint/eslint/issues/2342 + "no-unused-vars": "off", + + // Too much errors + "max-len": "off", + "brace-style": "off", + "key-spacing": "off", + "camelcase": "off", + + // Not really too much - waiting autofix features for these rules + "lines-around-comment": "off", + "dot-notation": "off" + } +} diff --git a/test/node_smoke_tests/.eslintrc b/test/node_smoke_tests/.eslintrc deleted file mode 100644 index 0d1d554d1..000000000 --- a/test/node_smoke_tests/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "env": { - "es6": true - }, - "extends" : "../../.eslintrc", - "root": true -} diff --git a/test/node_smoke_tests/.eslintrc.json b/test/node_smoke_tests/.eslintrc.json new file mode 100644 index 000000000..0877d24af --- /dev/null +++ b/test/node_smoke_tests/.eslintrc.json @@ -0,0 +1,7 @@ +{ + "env": { + "es6": true + }, + "extends" : "../../.eslintrc.json", + "root": true +} diff --git a/test/promises_aplus_adapters/.eslintrc b/test/promises_aplus_adapters/.eslintrc deleted file mode 100644 index 7acfff35a..000000000 --- a/test/promises_aplus_adapters/.eslintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../.eslintrc", - "root": true -} diff --git a/test/promises_aplus_adapters/.eslintrc.json b/test/promises_aplus_adapters/.eslintrc.json new file mode 100644 index 000000000..d11775710 --- /dev/null +++ b/test/promises_aplus_adapters/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "../../.eslintrc.json", + "root": true +}