{"_id":"@putout/plugin-remove-useless-push","_rev":"4159959","name":"@putout/plugin-remove-useless-push","description":"🐊Putout plugin adds ability to remove useless 'push()'","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T20:36:58.000Z","created":"2024-10-02T13:02:55.720Z","3.0.0":"2026-02-07T21:11:40.924Z","2.0.0":"2025-05-10T18:52:58.862Z","1.0.3":"2024-10-02T15:52:42.702Z","1.0.2":"2024-10-02T13:26:13.929Z","1.0.1":"2024-10-02T13:16:50.770Z","1.0.0":"2024-10-02T13:02:55.720Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"versions":{"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":{"shasum":"8bc656771e3dd3cd67795450fc58fcf942eaf9ac","size":2228,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@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,"_cnpmcore_publish_time":"2026-02-07T21:11:40.924Z","publish_time":1770498700924,"_source_registry_name":"default","_cnpm_publish_time":1770498700924},"2.0.0":{"name":"@putout/plugin-remove-useless-push","version":"2.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":{"eslint-plugin-putout":"^26.0.0"},"keywords":["putout","putout-plugin","plugin","push","putout-plugin-remove","putout-plugin-remove-useless","remove","useless"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=40"},"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@2.0.0","gitHead":"b7645c98fbfc62801a7baa7f83d0d231c482c7a9","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"23.11.0","_npmVersion":"11.1.0","dist":{"shasum":"9ea301b15f3d20d5e6bf8d3949a98b30c5328808","size":2227,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-2.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_2.0.0_1746903178669_0.8817776163444937"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-05-10T18:52:58.862Z","publish_time":1746903178862,"_source_registry_name":"default","_cnpm_publish_time":1746903178862},"1.0.3":{"name":"@putout/plugin-remove-useless-push","version":"1.0.3","type":"commonjs","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":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@1.0.3","gitHead":"8b24461456b40b69119a156f8088bcbc7ed1ceac","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.8.0","_npmVersion":"10.8.2","dist":{"shasum":"f5de5dfd9c744be07be1772e9390cf08ab1f0061","size":2225,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-1.0.3.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-useless-push_1.0.3_1727884362494_0.9158512489454806"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-02T15:52:42.702Z","publish_time":1727884362702,"_source_registry_name":"default","_cnpm_publish_time":1727884362702},"1.0.2":{"name":"@putout/plugin-remove-useless-push","version":"1.0.2","type":"commonjs","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":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@1.0.2","gitHead":"35b4372e5418b6c8f271610ab963168e53339523","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.9.0","_npmVersion":"10.8.2","dist":{"shasum":"720b91f756f065f837068dd7c9f03f049778ffda","size":2211,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-1.0.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","tmp":"tmp/plugin-remove-useless-push_1.0.2_1727875573752_0.4067824607570034"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-02T13:26:13.929Z","publish_time":1727875573929,"_source_registry_name":"default","_cnpm_publish_time":1727875573929},"1.0.1":{"name":"@putout/plugin-remove-useless-push","version":"1.0.1","type":"commonjs","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":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@1.0.1","gitHead":"63bee4ff23a71fc274f673087d0608e8da1aa663","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.9.0","_npmVersion":"10.8.2","dist":{"shasum":"52a499d37f61758ef57067f0b8e8ed6c5d195b3c","size":2205,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-1.0.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-remove-useless-push_1.0.1_1727875010596_0.048650226979572775"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-02T13:16:50.770Z","publish_time":1727875010770,"_source_registry_name":"default","_cnpm_publish_time":1727875010770},"1.0.0":{"name":"@putout/plugin-remove-useless-push","version":"1.0.0","type":"commonjs","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":{"@putout/test":"^11.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","madrun":"^10.0.0"},"peerDependencies":{"putout":">=36"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-remove-useless-push@1.0.0","gitHead":"0b203f45cce0ab14ee6bf0870faaa887ec45b9b0","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.9.0","_npmVersion":"10.8.2","dist":{"shasum":"838563b5b746185ec38399adddb0480ee79cde89","size":2180,"noattachment":false,"key":"/@putout/plugin-remove-useless-push/-/@putout/plugin-remove-useless-push-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@putout/plugin-remove-useless-push/download/@putout/plugin-remove-useless-push-1.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","tmp":"tmp/plugin-remove-useless-push_1.0.0_1727874175541_0.5853792015354735"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-02T13:02:55.720Z","publish_time":1727874175720,"_source_registry_name":"default","_cnpm_publish_time":1727874175720}},"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","_attachments":{},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-push#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}