Bug 1367198 - Remove duplicate ESLint rule definitions from various .eslintrc.js files. r?standard8 draft
authortiago <tiago.paez11@gmail.com>
Wed, 24 May 2017 13:55:24 -0300
changeset 583780 5c9f094e9f62bd0ac4c0c41090847bce10f9c1e6
parent 583779 37d777d872002597198405f22eefa9199e5103af
child 630203 4c3a2a57c5ecc2abd536f45dc87ab822fbe363d2
push id60546
push userbmo:tiago.paez11@gmail.com
push dateWed, 24 May 2017 16:55:41 +0000
reviewersstandard8
bugs1367198
milestone55.0a1
Bug 1367198 - Remove duplicate ESLint rule definitions from various .eslintrc.js files. r?standard8 MozReview-Commit-ID: AUz5l7XPfwY
accessible/tests/browser/.eslintrc.js
browser/components/migration/.eslintrc.js
browser/components/resistfingerprinting/test/browser/.eslintrc.js
browser/extensions/formautofill/.eslintrc.js
security/.eslintrc.js
toolkit/components/extensions/.eslintrc.js
toolkit/components/narrate/.eslintrc.js
toolkit/mozapps/extensions/.eslintrc.js
--- a/accessible/tests/browser/.eslintrc.js
+++ b/accessible/tests/browser/.eslintrc.js
@@ -36,20 +36,18 @@ module.exports = {
     "no-caller": "error",
     "no-catch-shadow": "error",
     "no-comma-dangle": "off",
     "no-console": "off",
     "no-constant-condition": "off",
     "no-continue": "off",
     "no-control-regex": "error",
     "no-div-regex": "off",
-    "no-eval": "error",
     "no-extend-native": "error",
     "no-extra-parens": "off",
-    "no-extra-semi": "error",
     "no-extra-strict": "off",
     "no-fallthrough": "error",
     "no-floating-decimal": "off",
     "no-inline-comments": "off",
     "no-mixed-requires": "off",
     "no-multi-str": "error",
     "no-multiple-empty-lines": ["error", {"max": 1}],
     "no-new-require": "off",
@@ -61,17 +59,16 @@ module.exports = {
     "no-proto": "error",
     "no-reserved-keys": "off",
     "no-restricted-modules": "off",
     "no-return-assign": "error",
     "no-script-url": "off",
     "no-sequences": "error",
     "no-shadow": "error",
     "no-space-before-semi": "off",
-    "no-sparse-arrays": "error",
     "no-sync": "off",
     "no-ternary": "off",
     "no-throw-literal": "error",
     "no-underscore-dangle": "off",
     "no-undefined": "off",
     "no-unneeded-ternary": "error",
     "no-unused-vars": ["error", {"vars": "all", "args": "none"}],
     "no-use-before-define": "off",
@@ -101,28 +98,26 @@ module.exports = {
     "no-eq-null": "off",
     "no-func-assign": "off",
     "no-implied-eval": "off",
     "no-inner-declarations": "off",
     "no-invalid-regexp": "off",
     "no-irregular-whitespace": "off",
     "no-iterator": "off",
     "no-label-var": "off",
-    "no-labels": "error",
     "no-lone-blocks": "off",
     "no-loop-func": "off",
     "no-negated-in-lhs": "off",
     "no-new": "off",
     "no-new-func": "off",
     "no-new-object": "off",
     "no-new-wrappers": "off",
     "no-obj-calls": "off",
     "no-octal-escape": "off",
     "no-undef-init": "error",
-    "no-unexpected-multiline": "error",
     "object-curly-spacing": "off",
     "no-unused-expressions": "off",
     "no-void": "off",
     "no-wrap-func": "off",
     "operator-assignment": "off",
     "operator-linebreak": ["error", "after"]
   }
 };
--- a/browser/components/migration/.eslintrc.js
+++ b/browser/components/migration/.eslintrc.js
@@ -11,17 +11,16 @@ module.exports = {
     "comma-style": ["error", "last"],
     "complexity": ["error", {"max": 21}],
     "dot-notation": "error",
     "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}],
     "max-nested-callbacks": ["error", 3],
     "new-parens": "error",
     "no-array-constructor": "error",
     "no-control-regex": "error",
-    "no-eval": "error",
     "no-extend-native": "error",
     "no-fallthrough": ["error", { "commentPattern": ".*[Ii]ntentional(?:ly)?\\s+fall(?:ing)?[\\s-]*through.*" }],
     "no-multi-str": "error",
     "no-return-assign": "error",
     "no-sequences": "error",
     "no-shadow": "error",
     "no-throw-literal": "error",
     "no-unneeded-ternary": "error",
--- a/browser/components/resistfingerprinting/test/browser/.eslintrc.js
+++ b/browser/components/resistfingerprinting/test/browser/.eslintrc.js
@@ -1,11 +1,8 @@
 "use strict";
 
 module.exports = {
   "extends": [
     "plugin:mozilla/browser-test"
   ],
 
-  "rules": {
-    "no-undef": "error"
-  }
 };
--- a/browser/extensions/formautofill/.eslintrc.js
+++ b/browser/extensions/formautofill/.eslintrc.js
@@ -25,26 +25,26 @@ module.exports = {
         "Number": "number",
         "String": "string",
         "bool": "boolean",
       },
       "requireParamDescription": false,
       "requireReturn": false,
       "requireReturnDescription": false,
     }],
-   
+
     // Forbid spaces inside the square brackets of array literals.
     "array-bracket-spacing": ["error", "never"],
 
     // Forbid spaces inside the curly brackets of object literals.
     "object-curly-spacing": ["error", "never"],
 
     // No space padding in parentheses
     "space-in-parens": ["error", "never"],
-   
+
     // Commas at the end of the line not the start
     "comma-style": "error",
 
     // Require braces around blocks that start a new line
     "curly": ["error", "all"],
 
     // Require function* name()
     "generator-star-spacing": ["error", {"before": false, "after": true}],
@@ -52,17 +52,17 @@ module.exports = {
     // Two space indent
     "indent": ["error", 2, {"SwitchCase": 1}],
 
     // Always require parenthesis for new calls
     "new-parens": "error",
 
     // Use [] instead of Array()
     "no-array-constructor": "error",
-   
+
     // No expressions where a statement is expected
     "no-unused-expressions": "error",
 
     // No declaring variables that are never used
     "no-unused-vars": ["error", {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}],
 
     // No using variables before defined
     "no-use-before-define": "error",
@@ -99,19 +99,16 @@ module.exports = {
     "no-caller": "error",
 
     // Disallow using the console API.
     "no-console": "error",
 
     // Disallow control characters in regular expressions.
     "no-control-regex": "error",
 
-    // Disallow use of eval(). We have other APIs to evaluate code in content.
-    "no-eval": "error",
-
     // Disallow fallthrough of case statements, except if there is a comment.
     "no-fallthrough": "error",
 
     // Disallow use of multiline strings (use template strings instead).
     "no-multi-str": "warn",
 
     // Disallow multiple empty lines.
     "no-multiple-empty-lines": ["warn", {"max": 2}],
@@ -140,18 +137,15 @@ module.exports = {
     "semi-spacing": ["error", {"before": false, "after": true}],
 
     // Require "use strict" to be defined globally in the script.
     "strict": ["error", "global"],
 
     // Disallow Yoda conditions (where literal value comes first).
     "yoda": "error",
 
-    // disallow use of eval()-like methods
-    "no-implied-eval": "error",
-
     // Disallow function or variable declarations in nested blocks
     "no-inner-declarations": "error",
 
     // Disallow creating new instances of String, Number, and Boolean
     "no-new-wrappers": "error",
   },
 };
--- a/security/.eslintrc.js
+++ b/security/.eslintrc.js
@@ -55,19 +55,16 @@ module.exports = {
     "no-constant-condition": ["error", { "checkLoops": false }],
 
     // Disallow control characters in regular expressions.
     "no-control-regex": "error",
 
     // Disallow duplicate class members.
     "no-dupe-class-members": "error",
 
-    // Disallow use of eval().
-    "no-eval": "error",
-
     // Disallow extending of native objects.
     "no-extend-native": "error",
 
     // Disallow case statement fallthrough without explicit `// falls through`
     // annotation.
     "no-fallthrough": "error",
 
     // No reassigning native JS objects or read only globals.
--- a/toolkit/components/extensions/.eslintrc.js
+++ b/toolkit/components/extensions/.eslintrc.js
@@ -198,19 +198,16 @@ module.exports = {
     "no-continue": "off",
 
     // Disallow control characters in regular expressions.
     "no-control-regex": "error",
 
     // Allow division operators explicitly at beginning of regular expression.
     "no-div-regex": "off",
 
-    // Disallow use of eval(). We have other APIs to evaluate code in content.
-    "no-eval": "error",
-
     // Disallow adding to native types
     "no-extend-native": "error",
 
     // Allow unnecessary parentheses, as they may make the code more readable.
     "no-extra-parens": "off",
 
     // Disallow fallthrough of case statements, except if there is a comment.
     "no-fallthrough": "error",
@@ -325,19 +322,16 @@ module.exports = {
 
     // Don't require regex literals to be wrapped in parentheses (which
     // supposedly prevent them from being mistaken for division operators).
     "wrap-regex": "off",
 
     // Disallow Yoda conditions (where literal value comes first).
     "yoda": "error",
 
-    // disallow use of eval()-like methods
-    "no-implied-eval": "error",
-
     // Disallow function or variable declarations in nested blocks
     "no-inner-declarations": "error",
 
     // Disallow labels that share a name with a variable
     "no-label-var": "error",
 
     // Disallow creating new instances of String, Number, and Boolean
     "no-new-wrappers": "error",
--- a/toolkit/components/narrate/.eslintrc.js
+++ b/toolkit/components/narrate/.eslintrc.js
@@ -20,17 +20,16 @@ module.exports = {
     "generator-star-spacing": ["warn", "after"],
     "indent": ["warn", 2, {"SwitchCase": 1}],
     "max-len": ["warn", 80, 2, {"ignoreUrls": true}],
     "max-nested-callbacks": ["error", 3],
     "new-cap": ["error", {"capIsNew": false}],
     "new-parens": "error",
     "no-array-constructor": "error",
     "no-control-regex": "error",
-    "no-eval": "error",
     "no-extend-native": "error",
     "no-fallthrough": "error",
     "no-inline-comments": "warn",
     "no-mixed-spaces-and-tabs": "error",
     "no-multi-spaces": "warn",
     "no-multi-str": "warn",
     "no-multiple-empty-lines": ["warn", {"max": 1}],
     "no-return-assign": "error",
--- a/toolkit/mozapps/extensions/.eslintrc.js
+++ b/toolkit/mozapps/extensions/.eslintrc.js
@@ -2,14 +2,11 @@
 
 module.exports = {
   "rules": {
     // 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}],
 
-    // No using undeclared variables
-    "no-undef": "error",
-
     "no-unused-vars": ["error", {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}],
   }
 };