From e203fab30ed8e3319e95894712171af46cb09cf6 Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Sun, 29 Oct 2017 19:12:12 -0700 Subject: [PATCH] chore(eslint): use words instead of numbers Eslint rules can be configured either using words or number values: * "off" or 0 * "warn" or 1 * "error" or 2 This switches our config to use the string values instead of the number values, since the number values are too cryptic. No change to our actual settings. --- .eslintrc.json | 40 ++++++++++++++++++++-------------------- test/.eslintrc.json | 28 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e712eeab..7037c176 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,26 +4,26 @@ }, "extends": "airbnb-base/legacy", "rules": { - "comma-dangle": [2, "always-multiline"], - "global-require": 0, - "vars-on-top": 0, - "spaced-comment": [2, "always", { "markers": ["@", "@include"], "exceptions": ["@", "@commands"] }], - "no-param-reassign": 0, - "no-console": 0, - "curly": [2, "multi-line"], - "func-names": 0, - "quote-props": 0, - "no-underscore-dangle": 0, - "max-len": 0, - "no-use-before-define": 0, - "no-empty": 0, - "no-else-return": 0, - "no-throw-literal": 0, - "newline-per-chained-call": 0, - "consistent-return": 0, - "no-mixed-operators": 0, - "no-prototype-builtins": 0, - "new-cap": [2, { + "comma-dangle": ["error", "always-multiline"], + "global-require": "off", + "vars-on-top": "off", + "spaced-comment": ["error", "always", { "markers": ["@", "@include"], "exceptions": ["@", "@commands"] }], + "no-param-reassign": "off", + "no-console": "off", + "curly": ["error", "multi-line"], + "func-names": "off", + "quote-props": "off", + "no-underscore-dangle": "off", + "max-len": "off", + "no-use-before-define": "off", + "no-empty": "off", + "no-else-return": "off", + "no-throw-literal": "off", + "newline-per-chained-call": "off", + "consistent-return": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "new-cap": ["error", { "capIsNewExceptions": [ "ShellString" ]} diff --git a/test/.eslintrc.json b/test/.eslintrc.json index fd8099cb..6f23f8ec 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -4,20 +4,20 @@ }, "extends": "airbnb-base", "rules": { - "import/no-mutable-exports": 0, - "global-require": 0, - "vars-on-top": 0, - "spaced-comment": [2, "always", { "markers": ["@", "@include"], "exceptions": ["@"] }], - "no-param-reassign": 0, - "no-console": 0, - "curly": 0, - "no-var": 2, - "prefer-const": 2, - "prefer-template": 0, - "prefer-arrow-callback": 0, - "no-underscore-dangle": 0, - "max-len": 0, - "new-cap": [2, { + "import/no-mutable-exports": "off", + "global-require": "off", + "vars-on-top": "off", + "spaced-comment": ["error", "always", { "markers": ["@", "@include"], "exceptions": ["@"] }], + "no-param-reassign": "off", + "no-console": "off", + "curly": "off", + "no-var": "error", + "prefer-const": "error", + "prefer-template": "off", + "prefer-arrow-callback": "off", + "no-underscore-dangle": "off", + "max-len": "off", + "new-cap": ["error", { "capIsNewExceptions": [ "ShellString" ]}