Upgrade ESLint to v2.3.0 (#20041)

Refs #19908

[skip sauce]
This commit is contained in:
Chris Rebert 2016-06-04 14:01:12 -07:00
parent a5ea86747a
commit 92ec110f08
3 changed files with 169 additions and 173 deletions

View File

@ -916,9 +916,9 @@
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz" "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz"
}, },
"eslint": { "eslint": {
"version": "2.2.0", "version": "2.3.0",
"from": "eslint@2.2.0", "from": "eslint@2.3.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-2.2.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.3.0.tgz",
"dependencies": { "dependencies": {
"argparse": { "argparse": {
"version": "1.0.7", "version": "1.0.7",
@ -996,11 +996,6 @@
"from": "estraverse@>=4.1.1 <5.0.0", "from": "estraverse@>=4.1.1 <5.0.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz"
}, },
"estraverse-fb": {
"version": "1.3.1",
"from": "estraverse-fb@>=1.3.1 <2.0.0",
"resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz"
},
"esutils": { "esutils": {
"version": "2.0.2", "version": "2.0.2",
"from": "esutils@>=2.0.0 <3.0.0", "from": "esutils@>=2.0.0 <3.0.0",

View File

@ -2,7 +2,7 @@
"root": true, "root": true,
"parser": "babel-eslint", "parser": "babel-eslint",
"parserOptions": { "parserOptions": {
"ecmaVersion": 6, "ecmaVersion": 7,
"sourceType": "module" "sourceType": "module"
}, },
"env": { "env": {
@ -13,177 +13,178 @@
"rules": { "rules": {
// Possible Errors // Possible Errors
"comma-dangle": [2, "never"], "comma-dangle": ["error", "never"],
"handle-callback-err": 2, "handle-callback-err": "error",
"no-bitwise": 2, "no-bitwise": "error",
"no-cond-assign": 2, "no-cond-assign": "error",
"no-console": 2, "no-console": "error",
"no-constant-condition": 2, "no-constant-condition": "error",
"no-control-regex": 2, "no-control-regex": "error",
"no-debugger": 2, "no-debugger": "error",
"no-dupe-args": 2, "no-dupe-args": "error",
"no-dupe-keys": 2, "no-dupe-keys": "error",
"no-duplicate-case": 2, "no-duplicate-case": "error",
"no-empty": 2, "no-empty": "error",
"no-empty-character-class": 2, "no-empty-character-class": "error",
"no-empty-pattern": 2, "no-empty-pattern": "error",
"no-ex-assign": 2, "no-ex-assign": "error",
"no-extra-boolean-cast": 2, "no-extra-boolean-cast": "error",
"no-extra-parens": 0, "no-extra-parens": "off",
"no-extra-semi": 2, "no-extra-semi": "error",
"no-func-assign": 2, "no-func-assign": "error",
"no-inner-declarations": 2, "no-inner-declarations": "error",
"no-invalid-regexp": 2, "no-invalid-regexp": "error",
"no-irregular-whitespace": 2, "no-irregular-whitespace": "error",
"no-negated-in-lhs": 2, "no-negated-in-lhs": "error",
"no-obj-calls": 2, "no-obj-calls": "error",
"no-regex-spaces": 2, "no-regex-spaces": "error",
"no-self-assign": 2, "no-restricted-globals": ["error", "event"],
"no-sparse-arrays": 2, "no-self-assign": "error",
"no-unexpected-multiline": 2, "no-sparse-arrays": "error",
"no-unreachable": 2, "no-unexpected-multiline": "error",
"use-isnan": 2, "no-unreachable": "error",
"valid-jsdoc": 0, "use-isnan": "error",
"valid-typeof": 2, "valid-jsdoc": "off",
"valid-typeof": "error",
//Best Practices //Best Practices
"accessor-pairs": 2, "accessor-pairs": "error",
"block-scoped-var": 2, "block-scoped-var": "error",
"consistent-return": 2, "consistent-return": "error",
"curly": 2, "curly": "error",
"default-case": 2, "default-case": "error",
"dot-location": 0, "dot-location": "off",
"dot-notation": 0, "dot-notation": "off",
"eqeqeq": 2, "eqeqeq": "error",
"guard-for-in": 2, "guard-for-in": "error",
"no-alert": 2, "no-alert": "error",
"no-caller": 2, "no-caller": "error",
"no-case-declarations": 2, "no-case-declarations": "error",
"no-div-regex": 2, "no-div-regex": "error",
"no-else-return": 2, "no-else-return": "error",
"no-eq-null": 2, "no-eq-null": "error",
"no-eval": 2, "no-eval": "error",
"no-extend-native": 2, "no-extend-native": "error",
"no-extra-bind": 2, "no-extra-bind": "error",
"no-fallthrough": 2, "no-fallthrough": "error",
"no-floating-decimal": 2, "no-floating-decimal": "error",
"no-implicit-coercion": 2, "no-implicit-coercion": "error",
"no-implied-eval": 2, "no-implied-eval": "error",
"no-invalid-this": 0, "no-invalid-this": "off",
"no-iterator": 2, "no-iterator": "error",
"no-labels": 2, "no-labels": "error",
"no-lone-blocks": 2, "no-lone-blocks": "error",
"no-loop-func": 2, "no-loop-func": "error",
"no-magic-numbers": [2, {"ignore": [-1, 0, 1]}], "no-magic-numbers": ["error", {"ignore": [-1, 0, 1]}],
"no-multi-spaces": 0, "no-multi-spaces": "off",
"no-multi-str": 2, "no-multi-str": "error",
"no-native-reassign": 2, "no-native-reassign": "error",
"no-new": 2, "no-new": "error",
"no-new-func": 0, "no-new-func": "off",
"no-new-wrappers": 2, "no-new-wrappers": "error",
"no-octal": 2, "no-octal": "error",
"no-octal-escape": 2, "no-octal-escape": "error",
"no-param-reassign": 0, "no-param-reassign": "off",
"no-process-env": 2, "no-process-env": "error",
"no-proto": 2, "no-proto": "error",
"no-redeclare": 2, "no-redeclare": "error",
"no-return-assign": 2, "no-return-assign": "error",
"no-script-url": 2, "no-script-url": "error",
"no-self-compare": 2, "no-self-compare": "error",
"no-sequences": 2, "no-sequences": "error",
"no-throw-literal": 2, "no-throw-literal": "error",
"no-unused-expressions": 2, "no-unused-expressions": "error",
"no-useless-call": 2, "no-useless-call": "error",
"no-useless-concat": 2, "no-useless-concat": "error",
"no-void": 2, "no-void": "error",
"no-warning-comments": 0, "no-warning-comments": "off",
"no-with": 2, "no-with": "error",
"radix": 2, "radix": "error",
"vars-on-top": 0, "vars-on-top": "off",
"wrap-iife": 2, "wrap-iife": "error",
"yoda": 2, "yoda": "error",
// Variables // Variables
"init-declarations": 0, "init-declarations": "off",
"no-catch-shadow": 2, "no-catch-shadow": "error",
"no-delete-var": 2, "no-delete-var": "error",
"no-label-var": 2, "no-label-var": "error",
"no-shadow": 0, "no-shadow": "off",
"no-shadow-restricted-names": 2, "no-shadow-restricted-names": "error",
"no-undef": 2, "no-undef": "error",
"no-undefined": 0, "no-undefined": "off",
"no-undef-init": 2, "no-undef-init": "error",
"no-unused-vars": 2, "no-unused-vars": "error",
"no-use-before-define": 0, "no-use-before-define": "off",
// Stylistic // Stylistic
"array-bracket-spacing": 2, "array-bracket-spacing": "error",
"block-spacing": 2, "block-spacing": "error",
"brace-style": 2, "brace-style": "error",
"camelcase": 2, "camelcase": "error",
"comma-spacing": 2, "comma-spacing": "error",
"comma-style": 2, "comma-style": "error",
"computed-property-spacing": 2, "computed-property-spacing": "error",
"consistent-this": 2, "consistent-this": "error",
"eol-last": 2, "eol-last": "error",
"func-names": 0, "func-names": "off",
"func-style": 0, "func-style": "off",
"indent": [2, 2, {"SwitchCase": 1}], "indent": ["error", 2, {"SwitchCase": 1}],
"key-spacing": 0, "key-spacing": "off",
"keyword-spacing": 2, "keyword-spacing": "error",
"linebreak-style": 2, "linebreak-style": "error",
"lines-around-comment": 0, "lines-around-comment": "off",
"new-cap": 0, "new-cap": "off",
"newline-after-var": 0, "newline-after-var": "off",
"new-parens": 2, "new-parens": "error",
"no-array-constructor": 2, "no-array-constructor": "error",
"no-continue": 0, "no-continue": "off",
"no-inline-comments": 0, "no-inline-comments": "off",
"no-lonely-if": 2, "no-lonely-if": "error",
"no-mixed-spaces-and-tabs": 2, "no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": 2, "no-multiple-empty-lines": "error",
"no-nested-ternary": 0, "no-nested-ternary": "off",
"no-new-object": 2, "no-new-object": "error",
"no-spaced-func": 2, "no-spaced-func": "error",
"no-ternary": 0, "no-ternary": "off",
"no-trailing-spaces": 2, "no-trailing-spaces": "error",
"no-underscore-dangle": 0, "no-underscore-dangle": "off",
"no-unneeded-ternary": 2, "no-unneeded-ternary": "error",
"object-curly-spacing": [1, "always"], "object-curly-spacing": ["warn", "always"],
"one-var": 0, "one-var": "off",
"operator-assignment": 2, "operator-assignment": "error",
"operator-linebreak": 0, "operator-linebreak": "off",
"padded-blocks": 0, "padded-blocks": "off",
"quote-props": [2, "as-needed"], "quote-props": ["error", "as-needed"],
"quotes": [2, "single"], "quotes": ["error", "single"],
"semi": [2, "never"], "semi": ["error", "never"],
"semi-spacing": 2, "semi-spacing": "error",
"sort-vars": 2, "sort-vars": "error",
"space-before-blocks": 2, "space-before-blocks": "error",
"space-before-function-paren": 0, "space-before-function-paren": "off",
"spaced-comment": 2, "spaced-comment": "error",
"space-infix-ops": 2, "space-infix-ops": "error",
"space-in-parens": 2, "space-in-parens": "error",
"space-unary-ops": 2, "space-unary-ops": "error",
// es6 // es6
"arrow-parens": 2, "arrow-parens": "error",
"arrow-spacing": 2, "arrow-spacing": "error",
"constructor-super": 2, "constructor-super": "error",
"generator-star-spacing": 2, "generator-star-spacing": "error",
"no-class-assign": 2, "no-class-assign": "error",
"no-const-assign": 2, "no-const-assign": "error",
"no-dupe-class-members": 2, "no-dupe-class-members": "error",
"no-new-symbol": 2, "no-new-symbol": "error",
"no-this-before-super": 2, "no-this-before-super": "error",
"no-var": 2, "no-var": "error",
"object-shorthand": 2, "object-shorthand": "error",
"prefer-arrow-callback": 2, "prefer-arrow-callback": "error",
"prefer-const": 0, "prefer-const": "off",
"prefer-reflect": 0, "prefer-reflect": "off",
"prefer-spread": 2, "prefer-spread": "error",
"prefer-template": 2, "prefer-template": "error",
"require-yield": 2 "require-yield": "error"
} }
} }

View File

@ -38,7 +38,7 @@
"devDependencies": { "devDependencies": {
"autoprefixer": "^6.0.3", "autoprefixer": "^6.0.3",
"babel-eslint": "^6.0.4", "babel-eslint": "^6.0.4",
"eslint": "^2.2.0", "eslint": "^2.3.0",
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-babel": "^5.0.3", "grunt-babel": "^5.0.3",
"grunt-build-control": "^0.6.0", "grunt-build-control": "^0.6.0",