Skip to content

Commit fb99b0d

Browse files
committed
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.
1 parent 7b6767d commit fb99b0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.eslintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"no-dupe-keys": "error",
6262
"no-duplicate-case": "error",
6363
"no-empty": ["error", { "allowEmptyCatch": true, }],
64+
"no-empty-character-class": "error",
6465
"no-ex-assign": "error",
6566
"no-extra-boolean-cast": "error",
6667
"no-func-assign": "error",
@@ -72,6 +73,7 @@
7273
"no-regex-spaces": "error",
7374
"no-setter-return": "error",
7475
"no-sparse-arrays": "error",
76+
"no-template-curly-in-string": "error",
7577
"no-unexpected-multiline": "error",
7678
"no-unreachable": "error",
7779
"no-unsafe-finally": "error",

0 commit comments

Comments
 (0)