{"_id":"@putout/plugin-spread","_rev":"7-32547115ec3a02946c668dddabbc36ea","name":"@putout/plugin-spread","dist-tags":{"latest":"3.2.0"},"versions":{"1.0.0":{"name":"@putout/plugin-spread","version":"1.0.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"7a9ca91b84d05cb72729ec6d045d38bd992ab9e0","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-1.0.0.tgz","fileCount":7,"integrity":"sha512-29tjh+iX5Te12v9ef3QJw51obOis2kLVnsLq+GKLwiz2Mp707aB90cpjUafB1xD/t7UMfkljDLMXZN0Hy2j+oQ==","signatures":[{"sig":"MEUCIQD9nuiDoK6lJGm0De3JJ1tQ/yrw29+J8lUAA442W4J6XgIgD9wmt1Jm6QuYnUrCNN5zBGnEGbta9ycZSj70rCqMvbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7374},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"befe4bab18e2cd908ad78c802c6b561df522e3d5","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"25.2.1","dependencies":{"eslint-plugin-putout":"^29.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"v10.0.0-alpha.0","madrun":"^11.0.0","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_1.0.0_1764582542789_0.10938107413219433","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@putout/plugin-spread","version":"1.1.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@1.1.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"84bdc743d7e4510739a1c44c7301a1ba94e24694","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-1.1.0.tgz","fileCount":8,"integrity":"sha512-4bywLpnYx++LTdwtsK5e92pOHBh0gD2RjNeat2b4SJfOO48Vs/vwiYp0boskQ6ZTU67oaemBQnC8kbtAVyDihg==","signatures":[{"sig":"MEUCIQD4MKnDWrwFWvcn5+OhYD4ZWZ5QrKAYjCic0+EdFMzmiwIgE6icY9tAanIYyRcQijrnQIjmuTTeO+KMiL+XKZCV1Iw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8256},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"c44094bbf521e8eff8429cb757b558af71e77885","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"25.2.1","dependencies":{"eslint-plugin-putout":"^29.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"v10.0.0-alpha.0","madrun":"^11.0.0","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_1.1.0_1764592457825_0.6009230482226628","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@putout/plugin-spread","version":"1.2.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@1.2.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"a2b0154676b20a13ff6029cbfbedbba3da70bf77","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-1.2.0.tgz","fileCount":9,"integrity":"sha512-r3Yrc2paxVL+NkXy7eC4JKn+jKyxwonCig3nOZIKh+P1CJpFd5zkT/sJ2f8w2QQQ7dMRw1X5BZ0Xvaa0Wmegdg==","signatures":[{"sig":"MEUCIQClgnWDMVOjePvgyonWm4JiqWMU9N7/qvG72F0inRethQIgagRgug+SvTufraCd7ez3PQyghnjyYwJ1mzf0UNEDKmQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10897},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"gitHead":"a59c8a790aeea305fa4a44fe4731252ec5b347ae","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"25.2.1","dependencies":{"eslint-plugin-putout":"^29.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"v10.0.0-alpha.0","madrun":"^11.0.0","@putout/test":"^14.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0"},"peerDependencies":{"putout":">=40"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_1.2.0_1764598751858_0.4740251781454139","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@putout/plugin-spread","version":"2.0.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@2.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"861abc24418aa627ffdfb83a6e021b4a6f2d48e8","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-2.0.0.tgz","fileCount":9,"integrity":"sha512-uYQ1DzVghJS/nrpL+svDTIU6LxTZliMeQu+sGbY1WHk551kbK4ZIp2ghii2S5m8oAJi+aLg4ckN0YABvuFAbNg==","signatures":[{"sig":"MEQCIH7E1dV5YVsQBWGo5+UQm5k/+bhf54xAxvBYfCRQf1wcAiBgz95VK5a8d1x34E6nNdMMmmFVmUQJc4jy1RQ5MKoePg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10983},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"a7847484864c3d53013350b0a9c2e16c18b5713e","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"25.3.0","dependencies":{"eslint-plugin-putout":"^30.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0-alpha.0","madrun":"^12.0.0","@putout/test":"^15.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^4.0.0"},"peerDependencies":{"putout":">=41"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_2.0.0_1769016256178_0.08247759464146953","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@putout/plugin-spread","version":"3.0.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@3.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"e739af9cbb3b02132922d9d3dff5947b9d2ecbdb","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-3.0.0.tgz","fileCount":9,"integrity":"sha512-mUqpferkGZQd731RUXQQaQnHLl936qfIvFAASswyDPB4x3Ztzw7KjpQ9ShxbmuJgGjhY8MylADX8Fe6szcuaSA==","signatures":[{"sig":"MEYCIQDcJXwlXit/OBeeFDAZwzbRJYWWBXcyGnetg+Qv8YXx9wIhAIX28UukcC6wD2IsqjVIRE6hunA0AlyWdi1s+o22u/nZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10902},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"efdde5b548c671ac4c40f147fab8d5e416f0d0c5","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"22.22.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0","madrun":"^13.0.0","@putout/test":"^15.0.0","eslint-plugin-putout":"^31.0.0"},"peerDependencies":{"putout":">=42"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_3.0.0_1771279999938_0.3575791992538564","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@putout/plugin-spread","version":"3.1.0","keywords":["putout","putout-plugin","plugin","spread","useless"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-spread@3.1.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"b278506b01adf39daf369484499b224f428f2950","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-3.1.0.tgz","fileCount":9,"integrity":"sha512-4l6tvd0xi7zjj2FQ8+fN6RvBcPOB/oS5iLzmVL84o16PbFjj1TzGpEIIRFWZmbVa3zXtVwLcSzx2PHDF5mE+8A==","signatures":[{"sig":"MEUCIC8IbpODhIiB5cq216wS0CfxbOBOFHl2KZzAt4k0Fj6XAiEAikC+Yl/i/lrZMX3PetbD+qxTX3mcpRYHw2A8GQrzkt4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10809},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"d2886fea8409d7ab2d5d8b109e4992e82a2df0a9","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.4.2","description":"🐊Putout plugin adds ability to remove useless spread","directories":{},"_nodeVersion":"24.14.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.0","superc8":"^12.0.0","@putout/test":"^15.0.0","eslint-plugin-putout":"^31.0.0"},"peerDependencies":{"putout":">=42"},"_npmOperationalInternal":{"tmp":"tmp/plugin-spread_3.1.0_1773396719556_0.8206589990523245","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@putout/plugin-spread","version":"3.2.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to remove useless spread","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme","main":"lib/index.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","spread","useless"],"devDependencies":{"@putout/test":"^15.0.0","eslint":"^10.0.0","eslint-plugin-putout":"^31.0.0","madrun":"^13.0.0","superc8":"^12.0.0"},"peerDependencies":{"putout":">=42"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"gitHead":"fbf7135fb589bc35bc1083caf0339a4389edf248","_id":"@putout/plugin-spread@3.2.0","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"26.8.1","_npmVersion":"12.0.2","dist":{"integrity":"sha512-EDRKPGeve59z1UaaW7XAR/xkse1XZ2Fe5RoP8Sx8Qil26+A5N9LOHolf9lmCaOclixui3rbBSCxIii9wv0+P/w==","shasum":"18e2cc201dba9bd0fea82d9144c71bf4a65f67da","tarball":"https://registry.npmjs.org/@putout/plugin-spread/-/plugin-spread-3.2.0.tgz","fileCount":10,"unpackedSize":12323,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMK0rP8h0PClrDdChbcNTVt81zb7lp6Wz4gnmOs5pVWAIgQIFKihyimXoPFOJgD4RXNg0smOOgnaWXvWQfzVNFMjM="}]},"_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-spread_3.2.0_1788514320790_0.5793750781770612"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-01T09:49:02.689Z","modified":"2026-09-04T09:32:01.285Z","1.0.0":"2025-12-01T09:49:03.013Z","1.1.0":"2025-12-01T12:34:18.106Z","1.2.0":"2025-12-01T14:19:12.061Z","2.0.0":"2026-01-21T17:24:16.325Z","3.0.0":"2026-02-16T22:13:20.086Z","3.1.0":"2026-03-13T10:11:59.699Z","3.2.0":"2026-09-04T09:32:00.958Z"},"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-spread#readme","keywords":["putout","putout-plugin","plugin","spread","useless"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability to remove useless spread","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# @putout/plugin-spread [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-spread.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-spread \"npm\"\n\n> **Spread** syntax can be used when all elements from an object or array need to be included in a list of some kind.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to transform **spread** syntax.\n\n## Install\n\n```\nnpm i @putout/plugin-spread\n```\n\n## Rules\n\n- ✅ [remove-useless-logical](#remove-useless-logical)\n- ✅ [convert-apply-to-spread](#convert-apply-to-spread);\n- ✅ [convert-convert-object-assign-to-merge-spread](#convert-object-assign-to-merge-spread);\n- ✅ [simplify-nested](#simplify-nested);\n- ✅ [remove-useless-array](#remove-useless-array);\n- ✅ [remove-useless-object](#remove-useless-object);\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"spread/convert-apply-to-spread\": \"on\",\n        \"spread/convert-object-assign-to-merge-spread\": \"on\",\n        \"spread/remove-useless-array\": \"on\",\n        \"spread/remove-useless-object\": \"on\",\n        \"spread/simplify-nested\": \"on\",\n        \"spread/remove-useless-logical\": \"on\"\n    }\n}\n```\n\n## convert-object-assign-to-merge-spread\n\n> The [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) method copies all enumerable own properties from one or more source objects to a target object and returns the modified target object.\n>\n> [**Spread**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) syntax (`...`) allows an object expression to be expanded in places where zero or more key-value pairs are expected.\n>\n> (c) MDN\n\nConvert `Object.assign()` to merge **spread** since it shorter but does (mostly) the same.\n\n### ❌ Example of incorrect code\n\n```js\nfunction merge(a) {\n    return Object.assign({}, a, {\n        hello: 'world',\n    });\n}\n```\n\n### ✅ Example of correct code\n\n```js\nfunction merge(a) {\n    return {\n        ...a,\n        hello: 'world',\n    };\n}\n```\n\n### Comparison\n\n| Linter        | Rule | Fix |\n|---------------|------|-----|\n| 🐊 **Putout** | [`spread/convert-object-assign-to-merge-spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#convert-object-assign-to-merge-spread) | ✅   |\n| ⏣ **ESLint**  | [`prefer-object-spread`](https://eslint.org/docs/rules/prefer-object-spread) | ✅   |\n\n## remove-useless-array\n\nThe thing is `[...b]` can be used for:\n\n- copying an array;\n- converting different value type like `string` to an `array`.\n\nSo better to be more concrete and use `slice` for copying and `Array()`/`Array.from()` for converting to decrease cognitive load.\nAlso sometimes there is no need on any of this operations, and we can drop `spread`.\n\n### ❌ Example of incorrect code\n\n```js\nfor (const a of [...b]) {}\n\nconst places = [...getPlaces()];\n```\n\n### ✅ Example of correct code\n\n```js\nfor (const a of b) {}\n\nconst places = getPlaces();\n\n// Array constructor creates sparse array\n[...Array(5)].map(Number);\n```\n\n## remove-useless-object\n\n### ❌ Example of incorrect code\n\n```js\nconst a = {\n    ...fn(),\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst a = fn();\n```\n\n## nested\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/60e5a99112affb8a629347e5bf04aedf/38b33f3b5b133897b346a018462c431824e64bb8).\n\n### ❌ Example of incorrect code\n\n```js\n[\n    ...[\n        ...a,\n        ...b,\n    ],\n    ...x,\n];\n```\n\n### ✅ Example of correct code\n\n```js\n[\n    ...a,\n    ...b,\n    ...x,\n];\n```\n\n## convert-apply-to-spread\n\n> Spread syntax (`...`) allows an array expression to be expanded in places where zero or more arguments are expected.\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)\n\n### ❌ Example of incorrect code\n\n```js\nconsole.apply(null, arguments);\n```\n\n### ✅ Example of correct code\n\n```js\nconsole.log(...arguments);\n```\n\n## remove-useless-logical\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6ceb0366f6576b18d4c08afe266ee637/da9616c2ad6f21472704d44e65609e81de22721c).\n\n### ❌ Example of incorrect code\n\n```js\nconst state = {\n    workbench: {\n        ...base.workbench,\n        ...overrides.workbench || {},\n    },\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst state = {\n    workbench: {\n        ...base.workbench,\n        ...overrides.workbench,\n    },\n};\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}