{"name":"@putout/plugin-remove-useless-arguments","version":"10.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@10.0.0","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":"73ed482059930bff3ce543d164b1e8d348f14ea9","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-arguments/download/@putout/plugin-remove-useless-arguments-10.0.0.tgz","fileCount":8,"integrity":"sha512-xFAxMcDxLDzHkyPYFzYmzTUY50rahlmG6Go/hgp3Kc9jh1E9f5tRL3osIchud+eKxV/Tuy7Ion6aVRIfDE2/GQ==","signatures":[{"sig":"MEYCIQCxT3j56botYsK+otMA6l6N0ke5MmgMZ8wHk7Ytq0LvmQIhAKm+K0qRnmPraiXx7MQb5SXlDO1ieG4jZ45yGnGF5VkW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12933,"size":4064,"noattachment":false,"key":"/@putout/plugin-remove-useless-arguments/-/@putout/plugin-remove-useless-arguments-10.0.0.tgz"},"main":"lib/index.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"d6da6e5beec072f650d2805d169bf6feb1a1fedb","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":"10.9.0","description":"🐊Putout plugin adds ability to find and remove useless arguments","directories":{},"_nodeVersion":"22.12.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^10.0.0","@putout/test":"^11.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^23.0.0"},"peerDependencies":{"putout":">=37"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-arguments_10.0.0_1736109561183_0.01732562218965228","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`.\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":1736109561390,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_cnpm_publish_time":1736109561390,"dist-tags":{"latest":"12.1.2"}}