README
@putout/plugin-remove-useless-arguments
putout
plugin adds ability to find and remove useless arguments
.
Install
npm i @putout/plugin-remove-useless-arguments
Rule
{
"rules": {
"remove-useless-arguments/arguments": "on",
"remove-useless-arguments/destructuring": "on"
}
}
❌ Incorrect code example
// destructuring
onIfStatement({
push,
generate,
abc,
helloworld,
});
function onIfStatement({push}) {
}
// arguments
sum(a, b, c);
const sum = (a, b) => {};
✅ Correct code Example
// destructuring
onIfStatement({
push,
});
function onIfStatement({push}) {
}
// arguments
sum(a, b, c);
const sum = (a, b) => {};
License
MIT