diff --git a/accessible/.eslintrc.js b/accessible/.eslintrc.js index 9f02c6d3d1ff..817c02b8d850 100644 --- a/accessible/.eslintrc.js +++ b/accessible/.eslintrc.js @@ -3,7 +3,7 @@ module.exports = { "rules": { // Warn about cyclomatic complexity in functions. - "complexity": ["error", 42], + "complexity": ["error", 47], // XXX These are rules that are enabled in the recommended configuration, but // disabled here due to failures when initially implemented. They should be diff --git a/browser/.eslintrc.js b/browser/.eslintrc.js index 1cdede3f1b7c..40716ff8f587 100644 --- a/browser/.eslintrc.js +++ b/browser/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { "rules": { // XXX Bug 1326071 - This should be reduced down - probably to 20 or to // be removed & synced with the mozilla/recommended value. - "complexity": ["error", {"max": 40}], + "complexity": ["error", {"max": 44}], // Disallow empty statements. This will report an error for: // try { something(); } catch (e) {} diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 5553fadd1fc2..9d766bc5cdfc 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -642,6 +642,7 @@ aMaxTotalProgress); }, + /* eslint-disable complexity */ onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aRequest) return; @@ -843,6 +844,7 @@ this.mStateFlags = aStateFlags; this.mStatus = aStatus; }, + /* eslint-enable complexity */ onLocationChange(aWebProgress, aRequest, aLocation, aFlags) { diff --git a/browser/components/migration/.eslintrc.js b/browser/components/migration/.eslintrc.js index fba586f11c01..3ac4b3e854d0 100644 --- a/browser/components/migration/.eslintrc.js +++ b/browser/components/migration/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { "rules": { "block-scoped-var": "error", "comma-dangle": ["error", "always-multiline"], - "complexity": ["error", {"max": 21}], + "complexity": ["error", {"max": 22}], "indent-legacy": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}], "max-nested-callbacks": ["error", 3], "new-parens": "error", diff --git a/browser/extensions/formautofill/.eslintrc.js b/browser/extensions/formautofill/.eslintrc.js index 18722fa6cf40..c11e0db0cd61 100644 --- a/browser/extensions/formautofill/.eslintrc.js +++ b/browser/extensions/formautofill/.eslintrc.js @@ -58,7 +58,7 @@ module.exports = { "comma-dangle": ["error", "always-multiline"], // Warn about cyclomatic complexity in functions. - "complexity": ["error", {"max": 20}], + "complexity": ["error", {"max": 26}], // Enforce dots on the next line with property name. "dot-location": ["error", "property"], diff --git a/devtools/.eslintrc.js b/devtools/.eslintrc.js index f024c4229b67..18339eca8153 100644 --- a/devtools/.eslintrc.js +++ b/devtools/.eslintrc.js @@ -81,7 +81,7 @@ module.exports = { // impair readability, but also not required either. "comma-dangle": "off", // Warn about cyclomatic complexity in functions. - "complexity": ["error", 35], + "complexity": ["error", 53], // Don't warn for inconsistent naming when capturing this (not so important // with auto-binding fat arrow functions). "consistent-this": "off", diff --git a/toolkit/.eslintrc.js b/toolkit/.eslintrc.js index e24bc6285f62..a757e1fbac25 100644 --- a/toolkit/.eslintrc.js +++ b/toolkit/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { rules: { // XXX Bug 1326071 - This should be reduced down - probably to 20 or to // be removed & synced with the mozilla/recommended value. - "complexity": ["error", 41], + "complexity": ["error", 44], "mozilla/no-task": "error", } diff --git a/toolkit/components/passwordmgr/.eslintrc.js b/toolkit/components/passwordmgr/.eslintrc.js index f8d9bc9dc828..48e7557930bd 100644 --- a/toolkit/components/passwordmgr/.eslintrc.js +++ b/toolkit/components/passwordmgr/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { "rules": { // XXX Bug 1358949 - This should be reduced down - probably to 20 or to // be removed & synced with the mozilla/recommended value. - "complexity": ["error", 43], + "complexity": ["error", 56], "no-unused-vars": ["error", {"args": "none", "vars": "local", "varsIgnorePattern": "^(ids|ignored|unused)$"}], } diff --git a/toolkit/components/satchel/.eslintrc.js b/toolkit/components/satchel/.eslintrc.js index fc2b4a46622d..e765b84568a6 100644 --- a/toolkit/components/satchel/.eslintrc.js +++ b/toolkit/components/satchel/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { "block-scoped-var": "error", "comma-dangle": ["error", "always-multiline"], complexity: ["error", { - max: 20, + max: 23, }], curly: ["error", "all"], "dot-location": ["error", "property"], diff --git a/toolkit/mozapps/extensions/.eslintrc.js b/toolkit/mozapps/extensions/.eslintrc.js index 86834d108c47..5f78dccf5e58 100644 --- a/toolkit/mozapps/extensions/.eslintrc.js +++ b/toolkit/mozapps/extensions/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { // Warn about cyclomatic complexity in functions. // XXX Bug 1326071 - This should be reduced down - probably to 20 or to // be removed & synced with the mozilla/recommended value. - "complexity": ["error", {"max": 60}], + "complexity": ["error", {"max": 68}], "no-unused-vars": ["error", {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}], } diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js index 1a773ce257fa..6ef1a2bd886b 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js @@ -119,7 +119,7 @@ module.exports = { // Warn about cyclomatic complexity in functions. // XXX Get this down to 20? - "complexity": ["error", 32], + "complexity": ["error", 34], // Don't require spaces around computed properties "computed-property-spacing": ["error", "never"],