{"name":"@putout/plugin-remove-useless-arguments","version":"12.0.0","keywords":["putout","putout-plugin","plugin","remove","useless","arguments"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-arguments@12.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-arguments#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"6ab4394d7208f236d469b7c34421306938dcc278","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-arguments/download/@putout/plugin-remove-useless-arguments-12.0.0.tgz","fileCount":9,"integrity":"sha512-3ZzqFVHdOiZYpxcJ3eXdCu6hEXc1ldIl91nxyDeBXoJummyLjfme8ieMxQBWj1UXEbUTDyaP69nGli+jy7mB3Q==","signatures":[{"sig":"MEUCIHt85yH4jReWv/+E/zRVX0pDPGJpZZ3n6Nx1SNoSZLWNAiEAqWRPF2ry+s0otbcsU3K50cCBQ5E6Ue16j7tplwOTqp0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14141,"size":4486,"noattachment":false,"key":"/@putout/plugin-remove-useless-arguments/-/@putout/plugin-remove-useless-arguments-12.0.0.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"9c87514e71738687cf09d9e6182a33db44e7ebf3","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊Putout plugin adds ability to find and remove useless arguments","directories":{},"_nodeVersion":"22.15.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","@putout/test":"^13.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^26.0.0"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-arguments_12.0.0_1747740583838_0.38165374639547434","host":"s3://npm-registry-packages-npm-production"},"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":1747740584042,"_cnpm_publish_time":1747740584042,"dist-tags":{"latest":"12.1.2"}}