Skip to content

Commit

Permalink
Less strict eslint rules (#79)
Browse files Browse the repository at this point in the history
Changes:
- curly: error -> off (no restrictions on {} usage on if, for, etc.)
- no-console: allow "warn" and "debug"
- no-mixed-operators:
  - allow mixing arithmetic (+-\*%\*\*) operators
  - disallow mixing ternary operator with some operators
- no-nested-ternary: off (avoid where possible pls)
- function-paren-newline: never -> multiline
- max-len.comments: 120 -> 160
  • Loading branch information
j0code authored Mar 23, 2024
1 parent 678d0e6 commit 7aec362
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"complexity": ["warn", 24],
"consistent-return": "off",
"consistent-this": ["warn", "that"],
"curly": ["error", "multi-or-nest"],
"curly": ["off", "multi-or-nest"],
"default-case": "off",
"default-case-last": "error",
"default-param-last": "off",
Expand Down Expand Up @@ -91,7 +91,7 @@
"no-caller": "error",
"no-case-declarations": "error",
"no-confusing-arrow": ["error", {"allowParens": true, "onlyOneSimpleParam": true}],
"no-console": ["error", {"allow": ["table", "group", "groupEnd", "dir"]}],
"no-console": ["error", {"allow": ["table", "group", "groupEnd", "dir", "warn", "debug"]}],
"no-continue": "off",
"no-delete-var": "error",
"no-div-regex": "warn",
Expand Down Expand Up @@ -120,11 +120,16 @@
"no-lonely-if": "warn",
"no-loop-func": "error",
"no-magic-numbers": "off",
"no-mixed-operators": ["warn"],
"no-mixed-operators": ["warn", { "groups": [
["&", "|", "^", "~", "<<", ">>", ">>>", "?:"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||", "?:"],
["in", "instanceof"]
] }],
"no-multi-assign": "off",
"no-multi-str": "error",
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-nested-ternary": "off",
"no-new": "off",
"no-new-func": "error",
"no-new-object": "warn",
Expand Down Expand Up @@ -213,7 +218,7 @@
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"function-call-argument-newline": ["error", "consistent"],
"function-paren-newline": ["error", "never"],
"function-paren-newline": ["error", "multiline"],
"generator-star-spacing": ["warn", {"before": false, "after": true}],
"implicit-arrow-linebreak": ["error", "beside"],
"indent": ["error", "tab"],
Expand All @@ -239,7 +244,7 @@
}],
"lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}],
"max-len": ["warn", {
"code": 160, "tabWidth": 2, "comments": 120, "ignoreUrls": true
"code": 160, "tabWidth": 2, "comments": 160, "ignoreUrls": true
}],
"max-statements-per-line": ["error", {"max": 1}],
"multiline-ternary": ["warn", "never"],
Expand Down

0 comments on commit 7aec362

Please sign in to comment.