Skip to content

Commit

Permalink
[meta] use string labels
Browse files Browse the repository at this point in the history
String labels like `"off","warn","error"` are easier to read/understand than `0,1,2`.
  • Loading branch information
justmoon committed Nov 13, 2023
1 parent de69d90 commit 3dc0101
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
"extends": "@ljharb",

"rules": {
"eqeqeq": [2, "allow-null"],
"func-name-matching": [2, "always"],
"max-depth": [1, 4],
"no-magic-numbers": [2, {
"eqeqeq": ["error", "allow-null"],
"func-name-matching": ["error", "always"],
"max-depth": ["warn", 4],
"no-magic-numbers": ["error", {
"ignore": [0, 1, 2],
}],
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
"sort-keys": [0],
"no-restricted-syntax": ["error", "BreakStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
"sort-keys": "off",
},

"overrides": [
{
"files": "test/**",
"rules": {
"max-lines-per-function": 0,
"no-magic-numbers": 0,
"max-lines-per-function": "off",
"no-magic-numbers": "off",
},
},
],
Expand Down

0 comments on commit 3dc0101

Please sign in to comment.