{"name":"@putout/plugin-remove-useless-arguments","version":"12.1.2","type":"module","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/v40.15.1/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/eslint-flat":"^3.0.0","@putout/test":"^14.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^28.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-arguments@12.1.2","gitHead":"2f6133764c3b7cb020b72a63166efece1f584727","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-l2e7Xl0thyi/RMOAyjLNxVbCq/RhBTMGf1bV9yLA1T0ueWHsiNx22i4Rz+OW+lUZ5AX/3EISCa4UQa6OZw3nGA==","shasum":"23e3da3de6f9876d7bd336bc1d4df4e76dc141c6","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-arguments/download/@putout/plugin-remove-useless-arguments-12.1.2.tgz","fileCount":9,"unpackedSize":14362,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDsKBNwJANILGN1ZMxiHxAdpMmN96eDH1iOtERXcTJ+JAIhAK3yqLqIIMVjg7RSZvdH7uaN7kx4+BqhyQ6wkmHKpkU3"}],"size":4538,"noattachment":false,"key":"/@putout/plugin-remove-useless-arguments/-/@putout/plugin-remove-useless-arguments-12.1.2.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-remove-useless-arguments_12.1.2_1764502672369_0.7295401860382533"},"_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`. Renamed to:\n\n- [`@putout/plugin-arguments`](https://www.npmjs.com/package/@putout/plugin-arguments).\n- [`@putout/plugin-destructuring`](https://www.npmjs.com/package/@putout/plugin-destructuring).\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":1764502672550,"_cnpm_publish_time":1764502672550,"dist-tags":{"latest":"12.1.2"}}