Skip to content

Commit a78d4aa

Browse files
committed
Add ESLint 6 support
1 parent ad51d62 commit a78d4aa

File tree

6 files changed

+28
-26
lines changed

6 files changed

+28
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"compile:lockfile": "node tasks/compile-lockfile.js"
2020
},
2121
"devDependencies": {
22-
"eslint": "5.16.0",
22+
"eslint": "6.1.0",
2323
"execa": "1.0.0",
2424
"fs-extra": "^7.0.1",
2525
"get-port": "^4.2.0",

packages/eslint-config-react-app/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ module.exports = {
163163
'no-obj-calls': 'warn',
164164
'no-octal': 'warn',
165165
'no-octal-escape': 'warn',
166-
'no-redeclare': 'warn',
166+
// TODO: Remove this option in the next major release of CRA.
167+
// https://eslint.org/docs/user-guide/migrating-to-6.0.0#-the-no-redeclare-rule-is-now-more-strict-by-default
168+
'no-redeclare': ['warn', { builtinGlobals: false }],
167169
'no-regex-spaces': 'warn',
168170
'no-restricted-syntax': ['warn', 'WithStatement'],
169171
'no-script-url': 'warn',

packages/eslint-config-react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@typescript-eslint/eslint-plugin": "1.x",
1919
"@typescript-eslint/parser": "1.x",
2020
"babel-eslint": "10.x",
21-
"eslint": "5.x",
22-
"eslint-plugin-flowtype": "2.x",
21+
"eslint": "6.x",
22+
"eslint-plugin-flowtype": "3.x",
2323
"eslint-plugin-import": "2.x",
2424
"eslint-plugin-jsx-a11y": "6.x",
2525
"eslint-plugin-react": "7.x",

packages/react-error-overlay/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@
3737
"@babel/code-frame": "7.0.0",
3838
"@babel/core": "7.4.3",
3939
"anser": "1.4.8",
40-
"babel-eslint": "10.0.1",
40+
"babel-eslint": "10.0.2",
4141
"babel-jest": "^24.8.0",
4242
"babel-loader": "8.0.5",
4343
"babel-preset-react-app": "^9.0.0",
4444
"chalk": "^2.4.2",
4545
"chokidar": "^2.1.2",
4646
"cross-env": "5.2.0",
47-
"eslint": "^5.16.0",
47+
"eslint": "^6.1.0",
4848
"eslint-config-react-app": "^4.0.1",
49-
"eslint-plugin-flowtype": "2.50.1",
50-
"eslint-plugin-import": "2.16.0",
51-
"eslint-plugin-jsx-a11y": "6.2.1",
52-
"eslint-plugin-react": "7.12.4",
49+
"eslint-plugin-flowtype": "3.12.1",
50+
"eslint-plugin-import": "2.18.2",
51+
"eslint-plugin-jsx-a11y": "6.2.3",
52+
"eslint-plugin-react": "7.14.3",
5353
"flow-bin": "^0.63.1",
5454
"html-entities": "1.2.1",
5555
"jest": "24.7.1",

packages/react-scripts/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"dependencies": {
3131
"@babel/core": "7.4.3",
3232
"@svgr/webpack": "4.3.1",
33-
"@typescript-eslint/eslint-plugin": "1.10.2",
34-
"@typescript-eslint/parser": "1.10.2",
35-
"babel-eslint": "10.0.1",
33+
"@typescript-eslint/eslint-plugin": "1.13.0",
34+
"@typescript-eslint/parser": "1.13.0",
35+
"babel-eslint": "10.0.2",
3636
"babel-jest": "^24.8.0",
3737
"babel-loader": "8.0.5",
3838
"babel-plugin-named-asset-import": "^0.3.2",
@@ -42,14 +42,14 @@
4242
"css-loader": "2.1.1",
4343
"dotenv": "6.2.0",
4444
"dotenv-expand": "4.2.0",
45-
"eslint": "^5.16.0",
45+
"eslint": "^6.1.0",
4646
"eslint-config-react-app": "^4.0.1",
47-
"eslint-loader": "2.1.2",
48-
"eslint-plugin-flowtype": "2.50.1",
49-
"eslint-plugin-import": "2.16.0",
50-
"eslint-plugin-jsx-a11y": "6.2.1",
51-
"eslint-plugin-react": "7.12.4",
52-
"eslint-plugin-react-hooks": "^1.5.0",
47+
"eslint-loader": "2.2.1",
48+
"eslint-plugin-flowtype": "3.12.1",
49+
"eslint-plugin-import": "2.18.2",
50+
"eslint-plugin-jsx-a11y": "6.2.3",
51+
"eslint-plugin-react": "7.14.3",
52+
"eslint-plugin-react-hooks": "^1.6.1",
5353
"file-loader": "3.0.1",
5454
"fs-extra": "7.0.1",
5555
"html-webpack-plugin": "4.0.0-beta.5",

packages/react-scripts/scripts/utils/createJestConfig.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ module.exports = (resolve, rootDir, isEjecting) => {
8484
];
8585
if (overrides) {
8686
supportedKeys.forEach(key => {
87-
if (overrides.hasOwnProperty(key)) {
88-
if (Array.isArray(config[key]) || typeof config[key] !== 'object') {
87+
if (Object.prototype.hasOwnProperty.call(overrides, key)) {
88+
if (Array.isArray(config[key]) || typeof config[key] !== 'object') {
8989
// for arrays or primitive types, directly override the config key
90-
config[key] = overrides[key];
90+
config[key] = overrides[key];
9191
} else {
9292
// for object types, extend gracefully
93-
config[key] = Object.assign({}, config[key], overrides[key]);
94-
}
95-
93+
config[key] = Object.assign({}, config[key], overrides[key]);
94+
}
95+
9696
delete overrides[key];
9797
}
9898
});

0 commit comments

Comments
 (0)