Closed
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