{"_id":"@putout/plugin-remove-useless-push","_rev":"6-85fcfc8e727d24439f9bdad7e94f3958","name":"@putout/plugin-remove-useless-push","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@putout/plugin-remove-useless-push","version":"1.0.0","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-push@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"838563b5b746185ec38399adddb0480ee79cde89","tarball":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-1.0.0.tgz","fileCount":4,"integrity":"sha512-4ktE1GmxsZmGkS3HpRjRL2AiBJAVaWykHefirFAoBMnuAR69VRMZ66NgOz2F4T/QsmyzlA4t2o2yBRp3JcPFPQ==","signatures":[{"sig":"MEUCIQDF3QV3BR7dhA27E1Ed6TWDrnRxk63KH/vxvXzQWcwfAgIgSyzVHkennGQoFNg5iKR/ZW8e5Vs4h6RdgngqnWErrts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4445},"main":"lib/remove-useless-push.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"0b203f45cce0ab14ee6bf0870faaa887ec45b9b0","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","publishOnly":"madrun publishOnly"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.8.2","description":"🐊Putout plugin adds ability to remove useless 'push()'","directories":{},"_nodeVersion":"22.9.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"},"peerDependencies":{"putout":">=36"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-push_1.0.0_1727874175541_0.5853792015354735","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@putout/plugin-remove-useless-push","version":"1.0.1","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-push@1.0.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"52a499d37f61758ef57067f0b8e8ed6c5d195b3c","tarball":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-1.0.1.tgz","fileCount":4,"integrity":"sha512-Ra5Fjo8ZqO+aV46fz01q1O2FdWRfKOT3o/ZIOp6HnkmD+s2s5YqSzdIhAcakJVBjJOa2M8753DPVs6OASnTdEQ==","signatures":[{"sig":"MEQCIHSlfmnNkio73MYRKaWoGp+E/S5G0wNWpd1ejIbTgnVHAiBLxMQNr4YI56DSm+G0jFKfdinQiktjKBjiIGo78l10TQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4528},"main":"lib/remove-useless-push.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"63bee4ff23a71fc274f673087d0608e8da1aa663","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","publishOnly":"madrun publishOnly"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.8.2","description":"🐊Putout plugin adds ability to remove useless 'push()'","directories":{},"_nodeVersion":"22.9.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"},"peerDependencies":{"putout":">=36"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-push_1.0.1_1727875010596_0.048650226979572775","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@putout/plugin-remove-useless-push","version":"1.0.2","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-push@1.0.2","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"720b91f756f065f837068dd7c9f03f049778ffda","tarball":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-1.0.2.tgz","fileCount":4,"integrity":"sha512-syjNOMn5gMhF0wavqNB3UVkPov7T/0HjIseR629hz3Oe5HYG4cZuUvYUBfy4QO1P40axcxjYiXEAKmX8W0T8ag==","signatures":[{"sig":"MEYCIQDfQj6ls+ZnyesquVaOIacbyxNLxSjlj3JRruaCOZyi8wIhAO9t9wIIeuITFZ5Y0MYpUJ19vgKoyiMBYGoReCdXXkKT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4537},"main":"lib/remove-useless-push.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"35b4372e5418b6c8f271610ab963168e53339523","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","publishOnly":"madrun publishOnly"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.8.2","description":"🐊Putout plugin adds ability to remove useless 'push()'","directories":{},"_nodeVersion":"22.9.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"},"peerDependencies":{"putout":">=36"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-push_1.0.2_1727875573752_0.4067824607570034","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@putout/plugin-remove-useless-push","version":"1.0.3","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-push@1.0.3","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"f5de5dfd9c744be07be1772e9390cf08ab1f0061","tarball":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-1.0.3.tgz","fileCount":4,"integrity":"sha512-G0e0QY6p9bd1HU5h8NoV/fMGI6+O2AWGXxQzkgPHiwtpklk4nIXkGtCLpZqNFpoa/bT9MvXUL9cgWfL5tIaoMQ==","signatures":[{"sig":"MEUCIBOR2MB9x8l/SVmQQbzUTbAH2G8gBYKZCL/4F9N1n4loAiEA3nG5hv9Tq98/U2MG2Q/XmHaW6NQenoILTRrRG9x/e1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4616},"main":"lib/remove-useless-push.js","type":"commonjs","engines":{"node":">=18"},"gitHead":"8b24461456b40b69119a156f8088bcbc7ed1ceac","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","publishOnly":"madrun publishOnly"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"10.8.2","description":"🐊Putout plugin adds ability to remove useless 'push()'","directories":{},"_nodeVersion":"22.8.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"},"peerDependencies":{"putout":">=36"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-push_1.0.3_1727884362494_0.9158512489454806","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@putout/plugin-remove-useless-push","version":"2.0.0","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-remove-useless-push@2.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"9ea301b15f3d20d5e6bf8d3949a98b30c5328808","tarball":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-2.0.0.tgz","fileCount":4,"integrity":"sha512-FC/hzTaoPdA7ZGjx8dKOJmmFuf0w4dwdnaNffCDe6TFz9w2jTDTmhXo+g8RfBlgqKYDYSM4QjXO8d24vXwMGFA==","signatures":[{"sig":"MEUCIQDDTyjLWg7oTFqHyrRqpdIdVgBlUzVdiLTgIMXs1XXmagIgK5mPfp7tmgh52bAM/iaOiFNP0JMMNBfgT28TgyCcW0Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4667},"main":"lib/remove-useless-push.js","type":"module","engines":{"node":">=20"},"gitHead":"b7645c98fbfc62801a7baa7f83d0d231c482c7a9","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","publishOnly":"madrun publishOnly"},"_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 remove useless 'push()'","directories":{},"_nodeVersion":"23.11.0","dependencies":{"eslint-plugin-putout":"^26.0.0"},"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"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-remove-useless-push_2.0.0_1746903178669_0.8817776163444937","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"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":"https://registry.npmjs.org/@putout/plugin-remove-useless-push/-/plugin-remove-useless-push-3.0.0.tgz","fileCount":4,"unpackedSize":4666,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDIng2tEFDt3dVLbhYtOAzbnEFELnOmhs03HOgSbLVFUwIhAPIuj5GQbFlytDfDlQBppVAquffrNlYvpBQ0qItHhqWc"}]},"_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}},"time":{"created":"2024-10-02T13:02:55.396Z","modified":"2026-02-07T21:11:41.079Z","1.0.0":"2024-10-02T13:02:55.720Z","1.0.1":"2024-10-02T13:16:50.770Z","1.0.2":"2024-10-02T13:26:13.929Z","1.0.3":"2024-10-02T15:52:42.702Z","2.0.0":"2025-05-10T18:52:58.862Z","3.0.0":"2026-02-07T21:11:40.924Z"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"license":"MIT","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability to remove useless 'push()'","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"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","readmeFilename":"README.md"}