{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"5.0.0","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":"http://github.com/coderaiser/putout","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","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","constant-conditions"],"devDependencies":{"@putout/test":"^2.0.0","coveralls":"^3.0.0","eslint":"^7.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^6.0.0","madrun":"^7.0.0","nyc":"^15.0.1","supertape":"^2.0.0"},"peerDependencies":{"putout":">=11"},"license":"MIT","engines":{"node":">=12"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-object-assign-to-merge-spread@5.0.0","_nodeVersion":"15.0.1","_npmVersion":"6.14.7","dist":{"integrity":"sha512-kpMPYe++ai46ZC4YDcLGe7WFzhvC8wbZi1z1LwpnPPZbPb+Hem0AqNpDrjzfO2aWJbYjJAZFlwzaQtOOfTNoww==","shasum":"75edd7481c0b0221798f3be985ec0a88bad44931","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-object-assign-to-merge-spread/download/@putout/plugin-convert-object-assign-to-merge-spread-5.0.0.tgz","fileCount":4,"unpackedSize":4603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfod8rCRA9TVsSAnZWagAAzAgP/2hA9OiqBuCim5qDNidO\nTH8aYzquUqfn8Oq1aIJkzp3/wqQMLukPWDc9T/Q6P3u5trRQU5Ju7d1lHcmY\n60joZJ6rrIW41+h82ZRlpcndNiKy907o+Z/8L0bhXdDE3BgtN+G5q0pqSviN\n9LgXwLClKtcdjK8fdXkDSF7vXSFCenYKZ9b0DviPayAF3+esGR5W6Xxqazhi\nIwngxkPaE6g7hI4BHk7zocWiG98tthQXM03ZibjnRYKZ/VSoXTZF7JM4gQkA\nV22qku/sm0RV+ZjM7D2xVoKSK6FN57ZtpAtC1xZJWeFhj8hUJeq/OdTF1Ekp\nH4pfJGWXJOMF5RLhZ23pADG7p24w95BOY0FJQDtMTOEXd98PcgiwLdyRZ6uz\nBJm9xpBqxlv2AIXBR/x1HH1zcm5hvL0YVdN0Nf8QaflSNHeImarGbRZK7V7e\n+pUC6FkUuvc/NRVT2tGNyhc3OXVSI1PLialjNCAh2TB54V8Ws8JNmhIrQPzj\n+aGoj0shxH37vpfkN5fC8MyKRHukb+wz1CI43vZFFIoh6HKYmhPHqU/bqUgC\nKhnCzRK7n3Diq0y5O+DHsOpWXWd17EeU3GlJsFnLrC5x+aWiz++pmHT9Peon\ncxer4nFhtRkAtM2pZbk2Wrg0l8IFf9rUmD7f3XZr5cOAa5ITfGyMzxxDEpNN\n2EfT\r\n=cZVA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcCZvvjbpjfPNw6l3p/cj9Z1XGUd7el+R+egVgWs68dAiBUt1yIDEoh6tCf+F0e+1szMyXcuen3dQpHx9WV4Irtow=="}],"size":2055,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-5.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_5.0.0_1604443947412_0.5729814407339633"},"_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":1604443947538,"_cnpm_publish_time":1604443947538,"dist-tags":{"latest":"7.0.1"}}