eslint-plugin-prefer-object-spread weekly downloads statistics
By bryanrsmith (2 listings) · npm · ESLint plugins
ESLint rule for suggesting that object spread properties be used instead of Object.assign().
eslint-plugin-prefer-object-spread has 49,158 recorded weekly downloads on npm, an increase of 8.4% over the past 30 days, ranking #792 of 3,247 tracked listings.
About eslint-plugin-prefer-object-spread
eslint-plugin-prefer-object-spread
ESLint rule for suggesting that object spread properties be used instead of Object.assign().
Installation
Install ESLint and eslint-plugin-prefer-object-spread:
$ npm install --save-dev eslint eslint-plugin-prefer-object-spread
Usage
Add prefer-object-spread to the plugins section of your .eslintrc configuration file, and configure the rule under the rules section.
{
"plugins": [
"prefer-object-spread"
],
"rules": {
"prefer-object-spread/prefer-object-spread": 2
}
}
This rule suggests that object spread properties 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.
When using this rule the following patterns are considered problems:
var a = Object.assign({}, foo); // error Use a spread property instead of Object.assign().
var b = Object.assign({ c: 1 }, bar); // error Use a spread property instead of Object.assign().
The following patterns are considered okay:
var a = { ...foo };
var b = { c: 1, ...bar };
Object.assign(b, { d: 2 });
Description from the npm listing.
- eslint
- eslintplugin
- eslint-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm ESLint plugins plugins
All 20 eslint-plugin-prefer-object-spread alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/eslint-plugin-prefer-object-spread. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.