Remove useless u flags in regular expressions (#18509)
This commit is contained in:
1 parent
97f2e81d06
commit
c9eb4bcd9e
131 files changed
+388
-405
No files matched your search
@@ -140,6 +140,12 @@ const configs = [
|
||||
exceptRange: true,
|
||||
},
|
||||
],
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
// Forbid `u` flag in regexp, kept for refactoring
|
||||
// "Literal[regex.flags=/u/]",
|
||||
// 'NewExpression[callee.name="RegExp"] > Literal.arguments:nth-child(2)[value=/u/]',
|
||||
],
|
||||
|
||||
// Internal rules
|
||||
"prettier-internal-rules/jsx-identifier-case": "error",
|
||||
|
||||
Reference in new issue
Block a user