@putout/plugin-remove-useless-arguments

putout plugin adds ability to find and remove useless arguments

Usage no npm install needed!

<script type="module">
  import putoutPluginRemoveUselessArguments from 'https://cdn.skypack.dev/@putout/plugin-remove-useless-arguments';
</script>

README

@putout/plugin-remove-useless-arguments NPM version Dependency Status

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