From 3dff1e47251800ecf658fcf8491371bb4ae8196b Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Tue, 5 Nov 2019 15:31:11 -0600 Subject: [PATCH] fix eslint config --- .eslintignore | 1 + .eslintrc.json | 13 +++++-------- bin/.eslintrc.json | 33 +++++++++++++++++++++++++++++++++ docs/.eslintrc.json | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 bin/.eslintrc.json create mode 100644 docs/.eslintrc.json diff --git a/.eslintignore b/.eslintignore index 121531af..f09ec93e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ +lib *.min.js diff --git a/.eslintrc.json b/.eslintrc.json index 4285bbc7..7915ab9b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,10 +3,6 @@ "plugins": [ "standard" ], - "parserOptions": { - "ecmaVersion": 5, - "sourceType": "script" - }, "rules": { "semi": ["error", "always"], "indent": ["error", 2, { @@ -20,11 +16,12 @@ "no-useless-escape": "off", "one-var": "off", "no-control-regex": "off", - "no-prototype-builtins": "off" + "no-prototype-builtins": "off", + + "prefer-const": "error", + "no-var": "error" }, "env": { - "node": true, - "browser": true, - "amd": true + "node": true } } diff --git a/bin/.eslintrc.json b/bin/.eslintrc.json new file mode 100644 index 00000000..6ee10878 --- /dev/null +++ b/bin/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": "standard", + "plugins": [ + "standard" + ], + "parserOptions": { + "ecmaVersion": 5, + "sourceType": "script" + }, + "rules": { + "semi": ["error", "always"], + "indent": ["error", 2, { + "SwitchCase": 1, + "VariableDeclarator": { "var": 2 }, + "outerIIFEBody": 0 + }], + "operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }], + "space-before-function-paren": ["error", "never"], + "no-cond-assign": "off", + "no-useless-escape": "off", + "one-var": "off", + "no-control-regex": "off", + "no-prototype-builtins": "off", + + "prefer-const": "off", + "no-var": "off" + }, + "env": { + "node": true, + "browser": true, + "amd": true + } +} diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json new file mode 100644 index 00000000..6ee10878 --- /dev/null +++ b/docs/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": "standard", + "plugins": [ + "standard" + ], + "parserOptions": { + "ecmaVersion": 5, + "sourceType": "script" + }, + "rules": { + "semi": ["error", "always"], + "indent": ["error", 2, { + "SwitchCase": 1, + "VariableDeclarator": { "var": 2 }, + "outerIIFEBody": 0 + }], + "operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }], + "space-before-function-paren": ["error", "never"], + "no-cond-assign": "off", + "no-useless-escape": "off", + "one-var": "off", + "no-control-regex": "off", + "no-prototype-builtins": "off", + + "prefer-const": "off", + "no-var": "off" + }, + "env": { + "node": true, + "browser": true, + "amd": true + } +}