sonarjs/unicode-aware-regex
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/unicode-aware-regex": "error",
},
},
];Regular expressions using Unicode character classes or property escapes should enable the unicode flag
/\u{1234}/
/\p{Alpha}//\u{1234}/u
/\p{Alpha}/uExamples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
sonarjs/unicode-aware-regex
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/unicode-aware-regex": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Loops should not contain more than a single "break" or "continue" statement
Values not convertible to numbers should not be used in numeric comparisons
Shorthand object properties should be grouped at the beginning or end of an object declaration
Variable, property and parameter names should comply with a naming convention