$ npm install @putout/plugin-remove-useless-arguments
πPutout plugin adds ability to find and remove useless arguments
.
npm i @putout/plugin-remove-useless-arguments
{
"rules": {
"remove-useless-arguments/arguments": "on",
"remove-useless-arguments/destructuring": "on",
"remove-useless-arguments/method": "on"
}
}
const sum = (a, b) => {}; // destructuring
sum(a, b, c);
const sum = (a, b) => {};
sum(a, b, c);
onIfStatement({
push,
generate,
abc,
helloworld,
});
function onIfStatement({push}) {}
onIfStatement({
push,
});
function onIfStatement({push}) {}
Check it out in πPutout Editor.
class Parser {
parseStatement(context, topLevel, exports) {
this.parseGuard(a, b);
}
parseGuard() {}
}
class Parser {
parseStatement(context, topLevel, exports) {
this.parseGuard();
}
parseGuard() {}
}
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE