Skip to content

Commit 5cc0dd6

Browse files
committedOct 29, 2020
Disallow use of the RegExp constructor in favor of regular expression literals (prefer-regex-literals)
Fixes: standard/standard#1413
1 parent 94f4352 commit 5cc0dd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
"padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }],
190190
"prefer-const": ["error", {"destructuring": "all"}],
191191
"prefer-promise-reject-errors": "error",
192+
"prefer-regex-literals": ["error", { "disallowRedundantWrapping": true }],
192193
"quote-props": ["error", "as-needed"],
193194
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
194195
"rest-spread-spacing": ["error", "never"],

0 commit comments

Comments
 (0)
Please sign in to comment.