Enable the no-empty-character-class
and no-template-curly-in-string
linting rules
The former prevents unintended errors in regexes. The latter is something I ran into a couple of times before editors had proper support for syntax highlighting in template literals, and it's an easy mistake to make, especially when converting older code to use template literals. Nowadays most editors display template literals in different colors, but nevertheless it seems like a good idea to enable this rule. Fortunately both rules don't require any code changes, so it's more for prevention.
This commit is contained in:
parent
7b6767d415
commit
fb99b0df0e
@ -61,6 +61,7 @@
|
||||
"no-dupe-keys": "error",
|
||||
"no-duplicate-case": "error",
|
||||
"no-empty": ["error", { "allowEmptyCatch": true, }],
|
||||
"no-empty-character-class": "error",
|
||||
"no-ex-assign": "error",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"no-func-assign": "error",
|
||||
@ -72,6 +73,7 @@
|
||||
"no-regex-spaces": "error",
|
||||
"no-setter-return": "error",
|
||||
"no-sparse-arrays": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-unexpected-multiline": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
|
Loading…
Reference in New Issue
Block a user