{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"6.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Object.assign to merge spead","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-assign-to-merge-spread#readme","main":"lib/convert-object-assign-to-merge-spread.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"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","remove","constant-conditions"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^15.0.0","madrun":"^9.0.0"},"peerDependencies":{"putout":">=25"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"10ec7017838d1dc12e06bd18205aa55cb51d0b22","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-object-assign-to-merge-spread@6.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-EdEgVRhIXZq6bV0WVcUwz0Zm72eEeWrWcccuKYnmUgJ20rL0LpUmxdVuTvDEzDsX4WjQXku32ACfAn/nUEfwiA==","shasum":"6b3283e93fcc77b481f32610fcfcc2b0bd2c388e","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-object-assign-to-merge-spread/download/@putout/plugin-convert-object-assign-to-merge-spread-6.0.0.tgz","fileCount":4,"unpackedSize":5372,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3sQy01LyB9K2sT3M2LdkOm325u9mmHbR48Ku45i1aCwIhALd4OHPPsjNEFHgDi3yPx/z12Wr5J0WixszCBAKywJak"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJib5k/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqW7hAAjFozO+nj5VRATJQ9gKQhgUh+kMQKu8t0sLHjDbMhQG9Cg3il\r\nv7Cn3k1uWabZ6qwirC7jjK1xTOtMhN6Ols7nNIwwD5x+7Cx0dczsjJAwc2hF\r\nqGsMEBBEm1Wf5+JFNThUiNY7DrdgvJ6kLIE8nO7bPWoD63jaatfit4ihkBp7\r\ncF/OHqsaQvbOGO/9Ey3KSU5qqKGMxqPXnUGSEScYBpxEcaEwh1mqNSQVmxEu\r\n86RbrzB5je8Pi3p5t+wPDs8sLZBnncQTBpLMfczeMDHGIFgWRIy9ooM8/RFw\r\nt2KQMdrC6QI1koV8TuTj1W0/EgLjKfKyQWMIo/fJAINJZNi7d1+O7niegjOj\r\nYCtQU8en6fMxBrMoNnegtLFEqzOQy0UT+og0YaI6wErCYOkaJlxKZbtc1ZNy\r\nFV2gBYg3no8TEhLBrdwU5RfOBfk73/qaVCEDxN8jdiLVWBTbzm8HZuSOXLIC\r\ny/QBrrxNLZgFAdjSUcBaVNrEacP2ippVf/jRYnzwfVIyTRdqQdZWxWuoZvUC\r\nYLlcxE5OQYP2Vu7OG/PZw2OCVDpH8IAp/wdhmqX8iX/xe3wKhT/29WNSOcVp\r\naGtJrUXEdkfwxKqnmcCg8iB6rtyLywmF4PB0tPN0k6Cj/OcT2Or7Ab4QhOgy\r\nXyKYeho3zrSpqJ4MC4UlyyvoFCZSR0vrbsQ=\r\n=QHYJ\r\n-----END PGP SIGNATURE-----\r\n","size":2397,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-6.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-convert-object-assign-to-merge-spread_6.0.0_1651480894796_0.6864253750499174"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-object-assign-to-merge-spread [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-assign-to-merge-spread.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-assign-to-merge-spread \"npm\"\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\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.assign()` to merge **spread** since it shorter but does (mostly) the same.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-object-assign-to-merge-spread -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-object-assign-to-merge-spread\": \"on\"\n    }\n}\n```\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\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout** | [`convert-object-assign-to-merge-spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-assign-to-merge-spread#readme) | ✅\n🦕 **ESLint** | [`prefer-object-spread`](https://eslint.org/docs/rules/prefer-object-spread) | ✅\n\n## License\n\nMIT\n","publish_time":1651480894988,"_cnpm_publish_time":1651480894988,"dist-tags":{"latest":"7.0.1"}}