{"_id":"eslint-plugin-prefer-object-spread","_rev":"5-3bcff3313e441c889ca9874a08a331d6","name":"eslint-plugin-prefer-object-spread","description":"ESLint rule for suggesting that object spread properties be used instead of Object.assign().","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"eslint-plugin-prefer-object-spread","version":"1.0.0","description":"ESLint rule for suggesting that object spread properties be used instead of Object.assign().","keywords":["eslint","eslintplugin","eslint-plugin"],"author":{"name":"Bryan R Smith","email":"BryanRSmith@gmail.com"},"homepage":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread","repository":{"type":"git","url":"git://github.com/bryanrsmith/eslint-plugin-prefer-object-spread.git"},"main":"dist/index.js","directories":{"lib":"dist/"},"files":["README.md","dist"],"scripts":{"build":"npm run lint && npm run test && rm -rf dist && babel src --out-dir dist","test":"babel-node node_modules/.bin/isparta cover --report text-summary --report lcov node_modules/mocha/bin/_mocha -- --recursive","lint":"eslint src/ test/","ci":"npm run build && cat coverage/lcov.info | node_modules/.bin/coveralls","patch":"release patch","minor":"release minor","major":"release major"},"dependencies":{},"peerDependencies":{"eslint":">=0.8.0"},"devDependencies":{"@bryanrsmith/eslint-config-standard":"1.0.2","babel-cli":"6.5.1","babel-preset-es2015":"6.5.0","babel-preset-stage-1":"6.5.0","babel-register":"6.5.1","coveralls":"2.11.6","eslint":"^1.3.1","isparta":"4.0.0","mocha":"^2.3.2","release-script":"1.0.2"},"engines":{"node":">=4.0.0"},"license":"MIT","babel":{"presets":["stage-1","es2015"]},"gitHead":"3766b56bb465c2ab2336cd212b9e3cc7ff81d8d3","bugs":{"url":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread/issues"},"_id":"eslint-plugin-prefer-object-spread@1.0.0","_shasum":"7cb053c035542b3f65018cdef8b5bc6300d9af8d","_from":".","_npmVersion":"3.4.1","_nodeVersion":"5.1.0","_npmUser":{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"},"dist":{"shasum":"7cb053c035542b3f65018cdef8b5bc6300d9af8d","tarball":"https://registry.npmjs.org/eslint-plugin-prefer-object-spread/-/eslint-plugin-prefer-object-spread-1.0.0.tgz","integrity":"sha512-j0oM+etVputsqFn7XHRWSruOLDly/s10GacutJwME6+XFS3HDeBovt846IIt9xctyNj/E0Jr1QlOkG2dbr8duw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXLVajNfmShcE9eZSRrYmF/Q8rJkka6TrIF9Vd/g24NgIhAN/MMihA1y5mUAFpArnw7iXNmlv6C5NTV2dUdZaFot+b"}]},"maintainers":[{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/eslint-plugin-prefer-object-spread-1.0.0.tgz_1455256953832_0.7485476057045162"}},"1.1.0":{"name":"eslint-plugin-prefer-object-spread","version":"1.1.0","description":"ESLint rule for suggesting that object spread properties be used instead of Object.assign().","keywords":["eslint","eslintplugin","eslint-plugin"],"author":{"name":"Bryan R Smith","email":"BryanRSmith@gmail.com"},"homepage":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread","repository":{"type":"git","url":"git://github.com/bryanrsmith/eslint-plugin-prefer-object-spread.git"},"main":"dist/index.js","directories":{"lib":"dist/"},"files":["README.md","dist"],"scripts":{"build":"npm run lint && npm run test && rm -rf dist && babel src --out-dir dist","test":"babel-node node_modules/.bin/isparta cover --report text-summary --report lcov node_modules/mocha/bin/_mocha -- --recursive","lint":"eslint src/ test/","ci":"npm run build && cat coverage/lcov.info | node_modules/.bin/coveralls","patch":"release patch","minor":"release minor","major":"release major"},"dependencies":{},"peerDependencies":{"eslint":">=0.8.0"},"devDependencies":{"@bryanrsmith/eslint-config-standard":"1.0.2","babel-cli":"6.5.1","babel-preset-es2015":"6.5.0","babel-preset-stage-1":"6.5.0","babel-register":"6.5.1","coveralls":"2.11.6","eslint":"^1.3.1","isparta":"4.0.0","mocha":"^2.3.2","release-script":"1.0.2"},"engines":{"node":">=4.0.0"},"license":"MIT","babel":{"presets":["stage-1","es2015"]},"gitHead":"d6f1a5dda24b21311b1fdc0e424d13150064c9ed","bugs":{"url":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread/issues"},"_id":"eslint-plugin-prefer-object-spread@1.1.0","_shasum":"e07ff58a096704deaff503ef260195a3159fa6c3","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"},"dist":{"shasum":"e07ff58a096704deaff503ef260195a3159fa6c3","tarball":"https://registry.npmjs.org/eslint-plugin-prefer-object-spread/-/eslint-plugin-prefer-object-spread-1.1.0.tgz","integrity":"sha512-2YjvATFezbUsxsoyg1aNKkxPdPnJbHkFWQFH16tXkrchoz6TUG9l4C69rKAp9xkMJ/g1KlSgxly8KDcD8UUj+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5enCxGBXfxm2LUmAO6H+9dHnLxWJsVa+hwTdQXPtjKgIgM58Y/EBPWXHHOZPhOhvui9WGfkIIN5nv7Z9IfZojX/c="}]},"maintainers":[{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/eslint-plugin-prefer-object-spread-1.1.0.tgz_1459527758983_0.3500375631265342"}},"1.2.1":{"name":"eslint-plugin-prefer-object-spread","version":"1.2.1","description":"ESLint rule for suggesting that object spread properties be used instead of Object.assign().","keywords":["eslint","eslintplugin","eslint-plugin"],"author":{"name":"Bryan R Smith","email":"BryanRSmith@gmail.com"},"homepage":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread","repository":{"type":"git","url":"git://github.com/bryanrsmith/eslint-plugin-prefer-object-spread.git"},"main":"dist/index.js","directories":{"lib":"dist/"},"files":["README.md","dist"],"scripts":{"build":"npm run lint && npm run test && rm -rf dist && babel src --out-dir dist","test":"NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/**/*.js","coverage":"nyc report --reporter=text-lcov | coveralls","lint":"eslint src/ test/","prettier":"yarn run prettier-core \"{{src,test}/*.js,{src,test}/**/*.js}\"","prettier-core":"prettier --print-width 100 --use-tabs --trailing-comma es5 --single-quote --write","patch":"release patch","minor":"release minor","major":"release major","precommit":"lint-staged"},"lint-staged":{"*.js":["prettier-core","git add"]},"peerDependencies":{"eslint":">=0.8.0"},"devDependencies":{"@bryanrsmith/eslint-config-standard":"2.1.3","babel-cli":"^6.24.1","babel-plugin-istanbul":"^4.0.0","babel-preset-env":"^1.4.0","babel-register":"^6.24.1","coveralls":"^2.13.0","eslint":"^3.0.1","eslint-config-prettier":"^1.6.0","husky":"^0.13.3","lint-staged":"^3.4.0","mocha":"^3.0.2","nyc":"^10.1.2","prettier":"^1.1.0","release-script":"1.0.2"},"engines":{"node":">=4.0.0"},"license":"MIT","babel":{"presets":["env"],"env":{"test":{"plugins":["istanbul"]}}},"nyc":{"include":["src/**/*.js"],"require":["babel-register"],"sourceMap":false,"instrument":false},"gitHead":"25faebb253deca980b6ed5bdaa291ec8aed4d410","bugs":{"url":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread/issues"},"_id":"eslint-plugin-prefer-object-spread@1.2.1","_shasum":"27fb91853690cceb3ae6101d9c8aecc6a67a402c","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"},"dist":{"shasum":"27fb91853690cceb3ae6101d9c8aecc6a67a402c","tarball":"https://registry.npmjs.org/eslint-plugin-prefer-object-spread/-/eslint-plugin-prefer-object-spread-1.2.1.tgz","integrity":"sha512-upA2W299LZNr49tGHmF0wUtFZw/fkQ+PkudsjZ0bP7dGFtRCFxItFtP39nDiet8u6rN/pOqhEYhBltW6T1OF5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICFqFdpHjUrKwpgGppYO0BjFuiJcMr3s9q3R1WLfhcX9AiEA2pBBLgI18mILXgvQj7czwBlYI3DEA4dxykzEJ/FdxGQ="}]},"maintainers":[{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/eslint-plugin-prefer-object-spread-1.2.1.tgz_1492534130489_0.5761637096293271"}}},"readme":"[![build status][travis-image]][travis-url]\n[![test coverage][coveralls-image]][coveralls-url]\n[![npm][npm-image]][npm-url]\n\n# eslint-plugin-prefer-object-spread\n\nESLint rule for suggesting that [object spread properties](https://github.com/sebmarkbage/ecmascript-rest-spread) be used instead of `Object.assign()`.\n\n## Installation\n\nInstall [ESLint](http://eslint.org) and `eslint-plugin-prefer-object-spread`:\n\n```\n$ npm install --save-dev eslint eslint-plugin-prefer-object-spread\n```\n\n## Usage\n\nAdd `prefer-object-spread` to the plugins section of your `.eslintrc` configuration file, and configure the rule under the rules section.\n\n```json\n{\n  \"plugins\": [\n    \"prefer-object-spread\"\n  ],\n  \"rules\": {\n    \"prefer-object-spread/prefer-object-spread\": 2\n  }\n}\n```\n\nThis rule suggests that [object spread properties](https://github.com/sebmarkbage/ecmascript-rest-spread) be used instead of `Object.assign()`. The rule is only applied when Object.assign() is used for cloning; not when it is used to extend an existing object. i.e., it applies when the first argument to `Object.assign()` is an object literal. This is because spread properties only iterate over own properties.\n\nWhen using this rule the following patterns are considered problems:\n\n```js\nvar a = Object.assign({}, foo); // error Use a spread property instead of Object.assign().\n\nvar b = Object.assign({ c: 1 }, bar); // error Use a spread property instead of Object.assign().\n```\n\nThe following patterns are considered okay:\n```js\nvar a = { ...foo };\n\nvar b = { c: 1, ...bar };\n\nObject.assign(b, { d: 2 });\n```\n\n[travis-image]: https://img.shields.io/travis/bryanrsmith/eslint-plugin-prefer-object-spread/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/bryanrsmith/eslint-plugin-prefer-object-spread\n[coveralls-image]: https://img.shields.io/coveralls/bryanrsmith/eslint-plugin-prefer-object-spread/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/github/bryanrsmith/eslint-plugin-prefer-object-spread?branch=master\n[npm-image]: https://img.shields.io/npm/v/eslint-plugin-prefer-object-spread.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/eslint-plugin-prefer-object-spread\n\n","maintainers":[{"name":"bryanrsmith","email":"BryanRSmith@gmail.com"}],"time":{"modified":"2022-06-17T20:39:04.839Z","created":"2016-02-12T06:02:35.377Z","1.0.0":"2016-02-12T06:02:35.377Z","1.1.0":"2016-04-01T16:22:39.542Z","1.2.1":"2017-04-18T16:48:52.568Z"},"homepage":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread","keywords":["eslint","eslintplugin","eslint-plugin"],"repository":{"type":"git","url":"git://github.com/bryanrsmith/eslint-plugin-prefer-object-spread.git"},"author":{"name":"Bryan R Smith","email":"BryanRSmith@gmail.com"},"bugs":{"url":"https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread/issues"},"license":"MIT","readmeFilename":"README.md"}