-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Would be nice to be able to use regex literals to not have to double-escape certain characters when using JS-based ESLint config.
Before
'@typescript-eslint/generic-type-naming': [
'error',
'^[A-Z][a-zA-Z\\d]+$'
],
After
'@typescript-eslint/generic-type-naming': [
'error',
/^[A-Z][a-zA-Z\d]+$/
],
It also means it becomes syntax highlighted and ESLint (through some built-in rules) can prevent some common mistakes when you lint the config itself.
This would require changes to the following rules:
@typescript-eslint/generic-type-naming
@typescript-eslint/member-naming
@typescript-eslint/no-unused-vars
Related ESLint issue: eslint/eslint#11318
szmarczak, kevva, SamVerschueren, j-f1, armano2 and 3 more
Metadata
Metadata
Assignees
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin