sonarjs/no-extra-arguments
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-extra-arguments": "error",
},
},
];function say(a, b) {
print(a + " " + b);
}
say("hello", "world", "!"); // Noncompliant; last argument is not usedThe documentation shows no correct example for this rule.
Examples from the ESLint documentation.
sonarjs/no-extra-arguments
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-extra-arguments": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Exclusive tests should not be committed to version control
Switch cases should end with an unconditional "break" statement
Equality operators should not be used in "for" loop termination conditions
Test and suite titles should not be empty or whitespace-only
Floating point numbers should not be tested for equality