sonarjs/no-unused-function-argument
eslint-plugin-sonarjs
Suggestion
eslint.config.js
export default [
{
rules: {
"sonarjs/no-unused-function-argument": "error",
},
},
];function doSomething(a, b) { // "a" is unused
return compute(b);
}function doSomething(b) {
return compute(b);
}function doSomething(_a, b) {
return compute(b);
}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/no-unused-function-argument
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-unused-function-argument": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Variables declared with "var" should be declared before they are used
Arithmetic operators should only have numbers as operands
Arithmetic operations should not result in "NaN"