Skip to content

Commit f5b0aac

Browse files
authoredApr 18, 2019
Relax ESLint version range (#6840)
* Relax eslint version range * Use semver package to compare versions during preflight check * Cleanup package.json files whitespace
1 parent 4b5b76b commit f5b0aac

File tree

10 files changed

+24
-22
lines changed

10 files changed

+24
-22
lines changed
 

‎packages/babel-plugin-named-asset-import/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.3.1",
44
"description": "Babel plugin for named asset imports in Create React App",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/babel-plugin-named-asset-import"
99
},
1010
"license": "MIT",

‎packages/babel-preset-react-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "7.0.2",
44
"description": "Babel preset used by Create React App",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/babel-preset-react-app"
99
},
1010
"license": "MIT",

‎packages/confusing-browser-globals/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"test": "jest"
99
},
1010
"repository": {
11-
"type" : "git",
12-
"url" : "https://github.com/facebook/create-react-app.git",
11+
"type": "git",
12+
"url": "https://github.com/facebook/create-react-app.git",
1313
"directory": "packages/confusing-browser-globals"
1414
},
1515
"keywords": [

‎packages/create-react-app/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
],
77
"description": "Create React apps with no build configuration.",
88
"repository": {
9-
"type" : "git",
10-
"url" : "https://github.com/facebook/create-react-app.git",
9+
"type": "git",
10+
"url": "https://github.com/facebook/create-react-app.git",
1111
"directory": "packages/create-react-app"
1212
},
1313
"license": "MIT",
@@ -33,7 +33,7 @@
3333
"fs-extra": "7.0.1",
3434
"hyperquest": "2.1.3",
3535
"inquirer": "6.2.2",
36-
"semver": "5.6.0",
36+
"semver": "6.0.0",
3737
"tar-pack": "3.4.1",
3838
"tmp": "0.0.33",
3939
"validate-npm-package-name": "3.0.0"

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "3.0.8",
44
"description": "ESLint configuration used by Create React App",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/eslint-config-react-app"
99
},
1010
"license": "MIT",

‎packages/react-app-polyfill/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.2.2",
44
"description": "Polyfills for various browsers including commonly used language features",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/react-app-polyfill"
99
},
1010
"license": "MIT",

‎packages/react-dev-utils/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "8.0.0",
44
"description": "Webpack utilities used by Create React App",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/react-dev-utils"
99
},
1010
"license": "MIT",

‎packages/react-error-overlay/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"build:prod": "cross-env NODE_ENV=production node build.js"
1212
},
1313
"repository": {
14-
"type" : "git",
15-
"url" : "https://github.com/facebook/create-react-app.git",
14+
"type": "git",
15+
"url": "https://github.com/facebook/create-react-app.git",
1616
"directory": "packages/react-error-overlay"
1717
},
1818
"license": "MIT",
@@ -44,7 +44,7 @@
4444
"chalk": "^2.4.2",
4545
"chokidar": "^2.1.2",
4646
"cross-env": "5.2.0",
47-
"eslint": "5.16.0",
47+
"eslint": "^5.16.0",
4848
"eslint-config-react-app": "^3.0.8",
4949
"eslint-plugin-flowtype": "2.50.1",
5050
"eslint-plugin-import": "2.16.0",

‎packages/react-scripts/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "2.1.8",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": {
6-
"type" : "git",
7-
"url" : "https://github.com/facebook/create-react-app.git",
6+
"type": "git",
7+
"url": "https://github.com/facebook/create-react-app.git",
88
"directory": "packages/react-scripts"
99
},
1010
"license": "MIT",
@@ -41,7 +41,7 @@
4141
"css-loader": "2.1.1",
4242
"dotenv": "6.2.0",
4343
"dotenv-expand": "4.2.0",
44-
"eslint": "5.16.0",
44+
"eslint": "^5.16.0",
4545
"eslint-config-react-app": "^3.0.8",
4646
"eslint-loader": "2.1.2",
4747
"eslint-plugin-flowtype": "2.50.1",
@@ -70,6 +70,7 @@
7070
"react-dev-utils": "^8.0.0",
7171
"resolve": "1.10.0",
7272
"sass-loader": "7.1.0",
73+
"semver": "6.0.0",
7374
"style-loader": "0.23.1",
7475
"terser-webpack-plugin": "1.2.3",
7576
"url-loader": "1.1.2",

‎packages/react-scripts/scripts/utils/verifyPackageTree.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
const chalk = require('react-dev-utils/chalk');
1212
const fs = require('fs');
13+
const semver = require('semver');
1314
const path = require('path');
1415

1516
// We assume that having wrong versions of these
@@ -74,7 +75,7 @@ function verifyPackageTree() {
7475
fs.readFileSync(maybeDepPackageJson, 'utf8')
7576
);
7677
const expectedVersion = expectedVersionsByDep[dep];
77-
if (depPackageJson.version !== expectedVersion) {
78+
if (!semver.satisfies(depPackageJson.version, expectedVersion)) {
7879
console.error(
7980
chalk.red(
8081
`\nThere might be a problem with the project dependency tree.\n` +

0 commit comments

Comments
 (0)