sonarjs/no-redundant-assignments
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-redundant-assignments": "error",
},
},
];a = b;
c = a;
b = c; // Noncompliant: c and b are already the samea = b;
c = a;Examples from the ESLint documentation.
sonarjs/no-redundant-assignments
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-redundant-assignments": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Wrapper objects should not be used for primitive types
Boolean literals should not be used in comparisons
Initial values of parameters, caught exceptions, and loop variables should not be ignored
OS commands should not rely on PATH resolution
Optional properties should not redundantly include 'undefined'