diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-05-02 13:04:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 13:04:17 -0400 |
commit | d581bffa15419b3b55773f1ed08a2e787e574f1f (patch) | |
tree | 2155e1db07d0417a9e964a70c2c3fb3fba5b7833 /.eslintrc.json | |
parent | c4ea9321dcffbda9004461a7b0027cf5c893f3c0 (diff) |
Style fixes (#494)
* Place multi-line expression parentheses on the correct line
* Add function-paren-newline eslint rule
* Add some additional eslint rules
Diffstat (limited to '.eslintrc.json')
-rw-r--r-- | .eslintrc.json | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 78fec27c..a2de6671 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "eqeqeq": "error", "func-names": ["error", "always"], "guard-for-in": "error", + "new-parens": "error", "no-case-declarations": "error", "no-const-assign": "error", "no-constant-condition": "off", @@ -31,6 +32,7 @@ "no-prototype-builtins": "error", "no-shadow": ["error", {"builtinGlobals": false}], "no-undef": "error", + "no-unexpected-multiline": "error", "no-unneeded-ternary": "error", "no-unused-vars": ["error", {"vars": "local", "args": "after-used", "argsIgnorePattern": "^_", "caughtErrors": "none"}], "no-unused-expressions": "error", @@ -40,6 +42,7 @@ "quotes": ["error", "single", "avoid-escape"], "require-atomic-updates": "off", "semi": "error", + "wrap-iife": ["error", "inside"], // Whitespace rules "brace-style": ["error", "1tbs", {"allowSingleLine": true}], @@ -53,6 +56,7 @@ "comma-spacing": ["error", { "before": false, "after": true }], "computed-property-spacing": ["error", "never"], "func-call-spacing": ["error", "never"], + "function-paren-newline": ["error", "multiline-arguments"], "generator-star-spacing": ["error", "before"], "key-spacing": ["error", {"beforeColon": false, "afterColon": true, "mode": "strict"}], "keyword-spacing": ["error", {"before": true, "after": true}], @@ -61,6 +65,11 @@ "object-curly-spacing": ["error", "never"], "rest-spread-spacing": ["error", "never"], "semi-spacing": ["error", {"before": false, "after": true}], + "space-before-function-paren": ["error", { + "anonymous": "never", + "named": "never", + "asyncArrow": "always" + }], "space-in-parens": ["error", "never"], "space-unary-ops": "error", "spaced-comment": ["error", "always"], |