Skip to content

Commit 8fd3f2b

Browse files
Merge pull request salesforce#1457 from interactivellama/prefer-object-spread
Prefer object spread eslint rule
2 parents 556710e + 9eeed70 commit 8fd3f2b

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"modules": true
1313
}
1414
},
15-
"plugins": ["filenames", "json"],
15+
"plugins": ["filenames", "json", "prefer-object-spread"],
1616
"env": {
1717
"browser": true
1818
},
@@ -112,6 +112,8 @@
112112
"no-tabs": "off",
113113
// _ is not really private.
114114
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
115+
//
116+
"prefer-object-spread/prefer-object-spread": [2, "always"],
115117
// Increases readability of function name
116118
"space-before-function-paren": [2, "always"],
117119

docs/browser-compatibility.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ The eventual goal is to remove all polyfills (such as [lodash](https://lodash.co
1010

1111
* `Array.prototype.findIndex` - use [core-js library](https://github.com/zloirock/core-js#commonjs)
1212
* `Element.classList` - use [classList.js](https://github.com/eligrey/classList.js)
13-
* `Object.assign` - use [core-js library](https://github.com/zloirock/core-js#commonjs)
1413

1514
### Internet Explorer 11 Support
1615

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@
139139
"async": "^2.0.0-rc.5",
140140
"babel-core": "^7.0.0-bridge.0",
141141
"babel-eslint": "^8.2.3",
142+
"babel-jest": "^23.0.1",
142143
"babel-loader": "^8.0.0-beta.3",
143144
"babel-plugin-import-noop": "^1.0.1",
144145
"babel-plugin-istanbul": "^4.1.6",
145146
"babel-plugin-root-import": "^5.1.0",
146-
"babel-jest": "^23.0.1",
147147
"basic-auth": "^1.0.4",
148148
"chai": "^4.0.1",
149149
"chai-enzyme": "^0.8.0",
@@ -159,6 +159,7 @@
159159
"eslint-plugin-import": "^2.11.0",
160160
"eslint-plugin-json": "^1.2.0",
161161
"eslint-plugin-jsx-a11y": "^6.0.3",
162+
"eslint-plugin-prefer-object-spread": "^1.2.1",
162163
"eslint-plugin-react": "^7.7.0",
163164
"express": "^4.15.5",
164165
"file-loader": "^0.11.0",

webpack.config.dist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const license = fs.readFileSync('./LICENSE.txt', 'utf8');
99

1010
const baseConfig = require('./webpack.config');
1111

12+
// eslint-disable-next-line prefer-object-spread/prefer-object-spread
1213
const config = Object.assign({}, baseConfig, {
1314
externals: {
1415
react: {

0 commit comments

Comments
 (0)