aboutsummaryrefslogtreecommitdiff
path: root/.eslintrc.json
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-22 15:22:42 -0500
committerGitHub <noreply@github.com>2020-02-22 15:22:42 -0500
commit897f2360be13db70ff2f533089ba8d38b0b744ed (patch)
treefdfdc9ed13fb38117e922d27c60616f159a2c63e /.eslintrc.json
parentf8f03f3af0ab031cc58bf5ad3f782c8d45137430 (diff)
parent6513a15b3b5fd8586226c8823e2680478b97e132 (diff)
Merge pull request #363 from toasted-nutbread/eslint-stylistic-rules
Eslint stylistic rules
Diffstat (limited to '.eslintrc.json')
-rw-r--r--.eslintrc.json34
1 files changed, 34 insertions, 0 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 9b0754fc..fcc6995b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -21,11 +21,16 @@
"curly": ["error", "all"],
"dot-notation": "error",
"eqeqeq": "error",
+ "func-names": ["error", "always"],
"no-case-declarations": "error",
"no-const-assign": "error",
"no-constant-condition": "off",
"no-global-assign": "error",
+ "no-param-reassign": "off",
+ "no-prototype-builtins": "error",
+ "no-shadow": ["error", {"builtinGlobals": false}],
"no-undef": "error",
+ "no-unneeded-ternary": "error",
"no-unused-vars": ["error", {"vars": "local", "args": "after-used", "argsIgnorePattern": "^_", "caughtErrors": "none"}],
"no-unused-expressions": "error",
"no-var": "error",
@@ -34,6 +39,35 @@
"quotes": ["error", "single", "avoid-escape"],
"require-atomic-updates": "off",
"semi": "error",
+
+ // Whitespace rules
+ "brace-style": ["error", "1tbs", {"allowSingleLine": true}],
+ "indent": ["error", 4, {"SwitchCase": 1, "MemberExpression": 1, "flatTernaryExpressions": true, "ignoredNodes": ["ConditionalExpression"]}],
+ "object-curly-newline": "error",
+ "padded-blocks": ["error", "never"],
+
+ "array-bracket-spacing": ["error", "never"],
+ "arrow-spacing": ["error", {"before": true, "after": true}],
+ "block-spacing": ["error", "always"],
+ "comma-spacing": ["error", { "before": false, "after": true }],
+ "computed-property-spacing": ["error", "never"],
+ "func-call-spacing": ["error", "never"],
+ "generator-star-spacing": ["error", "before"],
+ "key-spacing": ["error", {"beforeColon": false, "afterColon": true, "mode": "strict"}],
+ "keyword-spacing": ["error", {"before": true, "after": true}],
+ "no-trailing-spaces": "error",
+ "no-whitespace-before-property": "error",
+ "object-curly-spacing": ["error", "never"],
+ "rest-spread-spacing": ["error", "never"],
+ "semi-spacing": ["error", {"before": false, "after": true}],
+ "space-in-parens": ["error", "never"],
+ "space-unary-ops": "error",
+ "spaced-comment": ["error", "always", {"markers": ["global"]}],
+ "switch-colon-spacing": ["error", {"after": true, "before": false}],
+ "template-curly-spacing": ["error", "never"],
+ "template-tag-spacing": ["error", "never"],
+
+ // Extensions
"no-unsanitized/method": "error",
"no-unsanitized/property": "error"
},