Socket
Socket
Sign inDemoInstall

@putout/plugin-remove-useless-arguments

Package Overview
Dependencies
0
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/plugin-remove-useless-arguments

🐊Putout plugin adds ability to find and remove useless arguments


Version published
Weekly downloads
16K
decreased by-14.1%
Maintainers
1
Install size
10.1 kB
Created
Weekly downloads
 

Readme

Source

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

🐊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",
        "remove-useless-arguments/method": "on"
    }
}

arguments

❌ Example of incorrect code

const sum = (a, b) => {}; // destructuring
sum(a, b, c);

✅ Example of correct code

const sum = (a, b) => {};
sum(a, b, c);

destructuring

❌ Example of incorrect code

onIfStatement({
    push,
    generate,
    abc,
    helloworld,
});

function onIfStatement({push}) {}

✅ Example of correct code

onIfStatement({
    push,
});

function onIfStatement({push}) {}

method

Check it out in 🐊Putout Editor.

❌ Example of incorrect code

class Parser {
    parseStatement(context, topLevel, exports) {
        this.parseGuard(a, b);
    }
    
    parseGuard() {}
}

✅ Example of correct code

class Parser {
    parseStatement(context, topLevel, exports) {
        this.parseGuard();
    }
    
    parseGuard() {}
}

License

MIT

Keywords

FAQs

Last updated on 24 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc