{"name":"@putout/plugin-remove-useless-push","version":"3.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to remove useless 'push()'","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","main":"lib/remove-useless-push.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"publishOnly":"madrun publishOnly","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","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"devDependencies":{"eslint-plugin-putout":"^30.0.0","@putout/eslint-flat":"^4.0.0","@putout/test":"^15.0.0","c8":"^10.0.0","eslint":"^10.0.0","eslint-plugin-n":"^17.0.0","madrun":"^12.0.0"},"peerDependencies":{"putout":">=41"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@3.0.0","gitHead":"643708632e4bd633a3f763e78d419b4e3cf1c44c","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"25.5.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-MrW06Ie12Li4fmXyN+qB38zG4LrtM0iu2+YCPqa1u24G0thaW/N+BvpMewGplbylG9QqIbb7xgkFUP94Fi7s1w==","shasum":"8bc656771e3dd3cd67795450fc58fcf942eaf9ac","tarball":"http://registry-npm.ywwl.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-3.0.0.tgz","fileCount":4,"unpackedSize":4666,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDIng2tEFDt3dVLbhYtOAzbnEFELnOmhs03HOgSbLVFUwIhAPIuj5GQbFlytDfDlQBppVAquffrNlYvpBQ0qItHhqWc"}],"size":2228,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-3.0.0.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-push_3.0.0_1770498700752_0.6079030231464155"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-remove-useless-push [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-push.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-push \"npm\"\n\n> The `push()` method of `Array` instances adds the specified elements to the end of an array and returns the new length of the array.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to remove useless `push()`. The rule fits good with  [`putout/remove-unused-variables`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unused-variables#readme).\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/edebc3873f4b2ea6d99cfb957814bc63/603eed77455010519c1127490267888e3f6576a8).\n\n## Install\n\n```\nnpm i @putout/plugin-remove-useless-push\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"remove-useless-push\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfunction get() {\n    const a = [];\n    const b = [];\n    \n    a.push(1);\n    b.push(2);\n    \n    return b;\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction get() {\n    const a = [];\n    const b = [];\n    \n    b.push(2);\n    \n    return b;\n}\n```\n\n## License\n\nMIT\n","publish_time":1770498700924,"_cnpm_publish_time":1770498700924,"dist-tags":{"latest":"3.0.0"}}