{"name":"@putout/plugin-remove-useless-arguments","version":"11.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to find and remove useless arguments","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-arguments#readme","main":"lib/index.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","useless","arguments"],"devDependencies":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^24.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=38"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-arguments@11.0.0","gitHead":"644685b119da10025e222ed707cdf4ea3114f90f","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.13.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-eyJqXFgZQpDlDrlMys5163wyEhqD10rhXd+D0qg4ElORDPvbZTIkeSEZSAzUF95Bc4i+dTtoOKDcHLkV5A7/6Q==","shasum":"e6d2899626caa6090bd9e83059296552e0027f98","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-arguments/download/@putout/plugin-remove-useless-arguments-11.0.0.tgz","fileCount":9,"unpackedSize":14199,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQJLEWbNR9juvvVJnSI7TbT/IbPU9tbSnzQsQdW74ecQIhAPldKDEAXCmNEySf272XAPHHvH7C1NVHkoKQZMODyYnd"}],"size":4506,"noattachment":false,"key":"/@putout/plugin-remove-useless-arguments/-/@putout/plugin-remove-useless-arguments-11.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-remove-useless-arguments_11.0.0_1739465908904_0.8670178551114585"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-useless-arguments [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-arguments.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-arguments\"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove useless `arguments`.\n\n## Install\n\n```\nnpm i @putout/plugin-remove-useless-arguments\n```\n\n## Rules\n\n- ✅ [arguments](#arguments);\n- ✅ [destructuring](#destructring);\n- ✅ [method](#method);\n- ✅ [unused](#unused);\n- ✅ [json-parse](#json-parse);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"remove-useless-arguments/arguments\": \"on\",\n        \"remove-useless-arguments/destructuring\": \"on\",\n        \"remove-useless-arguments/method\": \"on\",\n        \"remove-useless-arguments/unused\": \"on\",\n        \"remove-useless-arguments/json-parse\": \"on\"\n    }\n}\n```\n\n## arguments\n\n### ❌ Example of incorrect code\n\n```js\nconst sum = (a, b) => {}; // destructuring\nsum(a, b, c);\n```\n\n### ✅ Example of correct code\n\n```js\nconst sum = (a, b) => {};\nsum(a, b);\n```\n\n### destructuring\n\n### ❌ Example of incorrect code\n\n```js\nonIfStatement({\n    push,\n    generate,\n    abc,\n    helloworld,\n});\n\nfunction onIfStatement({push}) {}\n```\n\n### ✅ Example of correct code\n\n```js\nonIfStatement({\n    push,\n});\n\nfunction onIfStatement({push}) {}\n```\n\n### method\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/362c37e9f533299a7e721ac46f936801/0a47d094bd2a048eb6dcc224b808a63f2d076ccb).\n\n### ❌ Example of incorrect code\n\n```js\nclass Parser {\n    parseStatement(context, topLevel, exports) {\n        this.parseGuard(a, b);\n    }\n    \n    parseGuard() {}\n}\n```\n\n### ✅ Example of correct code\n\n```js\nclass Parser {\n    parseStatement(context, topLevel, exports) {\n        this.parseGuard();\n    }\n    \n    parseGuard() {}\n}\n```\n\n### unused\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/f6bf5e069cfb1328fe7418c501e265cc/388ab2266babe84f77c1f82687f5ed44873e8651).\n\n### ❌ Example of incorrect code\n\n```js\nmember += compute(member, list[i]);\n\nfunction compute(member, current) {\n    return String(current);\n}\n```\n\n### ✅ Example of correct code\n\n```js\nmember += compute(list[i]);\n\nfunction compute(current) {\n    return String(current);\n}\n```\n\n### json-parse\n\n> The `JSON.parse()` static method parses a JSON string, constructing the JavaScript value or object described by the string. An optional reviver function can be provided to perform a transformation on the resulting object before it is returned.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)\n\nCheck it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/efdb0e3d0ab937f7901ce3047626b5fd/580aa27e4fb61fbfe3eead0cd21971a6ff084174).\n\n### ❌ Example of incorrect code\n\n```js\nimport {operator} from 'putout';\n\nconst {fromJS} = operator;\nJSON.parse(fromJS(print(ast)), null, 4);\n```\n\n### ✅ Example of correct code\n\n```js\nimport {operator} from 'putout';\n\nconst {fromJS} = operator;\nJSON.parse(fromJS(print(ast)));\n```\n\n## License\n\nMIT\n","publish_time":1739465909090,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1739465909090,"dist-tags":{"latest":"12.1.2"}}