sonarjs/variable-name
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/variable-name": "error",
},
},
];Variable, property and parameter names should comply with a naming convention
const foo_bar = 1;
const baz_ = 2;const fooBar = 1;
const _baz = 2;Examples 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/variable-name
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/variable-name": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Values not convertible to numbers should not be used in numeric comparisons
Regular expressions using Unicode character classes or property escapes should enable the unicode flag
Loops should not contain more than a single "break" or "continue" statement
Shorthand object properties should be grouped at the beginning or end of an object declaration