sonarjs/no-nested-assignment
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-nested-assignment": "error",
},
},
];Assignments should not be made from within sub-expressions
if (val = value() && check()) { // Noncompliant
// ...
}val = value();
if (val && check()) {
// ...
}Examples from the ESLint documentation.
sonarjs/no-nested-assignment
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-nested-assignment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Reactive state should not be unconditionally mutated inside Vue's "updated" lifecycle hook
Unicode Grapheme Clusters should be avoided inside regex character classes
Array-mutating methods should not be used misleadingly
OS commands should not rely on PATH resolution