Skip to content

Commit eceff7c

Browse files
author
Paul Marbach
committed
fix: update dependencies for peerDependency warnings
peerDependencies in the packages were throwing warnings, potentially related to yarnpkg/yarn#5810. In this commit, we rework the peerDependency definitions to align better with the conventions outlined in the main peerDependency documentation, and we define devDependencies both at the top level and at the package level, since package-level is technically closer to "correct" but it doesn't satisfy the checks in yarn yet. In addition, we've bumped a few versions and aligned across the packages where duplication occurs, which led to our tests running into jsx-eslint/eslint-plugin-react#2329 for our "detect" mode in eslint-plugin-react.
1 parent a309a20 commit eceff7c

File tree

9 files changed

+126
-98
lines changed

9 files changed

+126
-98
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
],
1515
"devDependencies": {
1616
"@spotify/web-scripts": "^1.0.0",
17-
"husky": "^2.4.0",
18-
"lerna": "^3.15.0",
19-
"prettier": "^1.18.0",
20-
"eslint": "^5.0.0",
21-
"eslint-plugin-jsx-a11y": "^6.2.1",
22-
"eslint-plugin-react": "^7.14.2",
2317
"@typescript-eslint/eslint-plugin": "^1.11.0",
2418
"@typescript-eslint/parser": "^1.11.0",
25-
"typescript":"*"
19+
"eslint": "^5.16.0",
20+
"eslint-plugin-jsx-a11y": "^6.2.1",
21+
"eslint-plugin-react": "^7.14.2",
22+
"husky": "^2.4.0",
23+
"lerna": "^3.15.0",
24+
"prettier": "^1.18.2",
25+
"typescript": "^3.4.3"
2626
},
2727
"husky": {
2828
"hooks": {

packages/eslint-config-base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Spotify's base ESLint config",
66
"main": "index.js",
77
"peerDependencies": {
8-
"eslint": "^5.0.0"
8+
"eslint": "5.x"
99
},
1010
"publishConfig": {
1111
"access": "public"

packages/eslint-config-react/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ module.exports = {
55
jsx: true,
66
},
77
},
8-
settings: {
9-
react: {
10-
version: 'detect',
11-
},
12-
},
138
extends: ['plugin:jsx-a11y/recommended'],
149
rules: {
1510
// Prevent missing displayName in a React component definition

packages/eslint-config-react/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"license": "Apache-2.0",
55
"description": "Spotify's ESLint config for React projects",
66
"main": "index.js",
7-
"peerDependencies": {
8-
"eslint": "^5.0.0",
7+
"devDependencies": {
8+
"eslint": "^5.16.0",
99
"eslint-plugin-jsx-a11y": "^6.2.1",
1010
"eslint-plugin-react": "^7.14.2"
1111
},
12+
"peerDependencies": {
13+
"eslint": "5.x",
14+
"eslint-plugin-jsx-a11y": "6.x",
15+
"eslint-plugin-react": ">=7.7.0 <8"
16+
},
1217
"publishConfig": {
1318
"access": "public"
1419
},

packages/eslint-config-typescript/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
"license": "Apache-2.0",
55
"description": "Spotify's ESLint config for TypeScript",
66
"main": "index.js",
7-
"peerDependencies": {
7+
"devDependencies": {
88
"@typescript-eslint/eslint-plugin": "^1.11.0",
99
"@typescript-eslint/parser": "^1.11.0",
10-
"eslint": "^5.0.0"
10+
"eslint": "^5.16.0"
11+
},
12+
"peerDependencies": {
13+
"@typescript-eslint/eslint-plugin": ">=1.5 <2",
14+
"@typescript-eslint/parser": ">=1.5 <2",
15+
"eslint": "5.x"
1116
},
1217
"publishConfig": {
1318
"access": "public"

packages/prettier-config/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
"license": "Apache-2.0",
55
"description": "Spotify's base Prettier config",
66
"main": "index.js",
7+
"devDependencies": {
8+
"prettier": "^1.18.2"
9+
},
710
"peerDependencies": {
8-
"prettier": "^1.18.0"
11+
"prettier": "1.x"
912
},
1013
"publishConfig": {
1114
"access": "public"

packages/tsconfig/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"test": "./run-tests.sh"
1111
},
1212
"devDependencies": {
13-
"typescript": "^3.2.2"
13+
"typescript": "^3.4.3"
14+
},
15+
"peerDependencies": {
16+
"typescript": ">=3.2 <4"
1417
},
1518
"publishConfig": {
1619
"access": "public"

packages/web-scripts/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@
3838
"@types/jest": "^24.0.11",
3939
"@types/react": "^16.8.19",
4040
"@types/react-dom": "^16.8.4",
41-
"@typescript-eslint/eslint-plugin": "^1.7.0",
42-
"@typescript-eslint/parser": "^1.7.0",
41+
"@typescript-eslint/eslint-plugin": "^1.11.0",
42+
"@typescript-eslint/parser": "^1.11.0",
4343
"commander": "^2.20.0",
4444
"commitizen": "^3.1.1",
4545
"cross-spawn-promise": "^0.10.1",
4646
"cz-conventional-changelog": "^2.1.0",
4747
"debug": "^4.1.1",
48-
"eslint": "^5.15.3",
49-
"eslint-config-prettier": "^4.1.0",
48+
"eslint": "^5.16.0",
49+
"eslint-config-prettier": "^6.0.0",
5050
"eslint-plugin-jsx-a11y": "^6.2.1",
5151
"eslint-plugin-react": "^7.12.4",
5252
"jest": "^24.5.0",
5353
"jest-junit": "^6.3.0",
5454
"lint-staged": "^8.1.5",
55-
"prettier": "^1.16.4",
56-
"semantic-release": "15",
55+
"prettier": "^1.18.2",
56+
"semantic-release": "^15.13.17",
5757
"ts-jest": "^24.0.2",
5858
"typescript": "^3.4.3"
5959
},

0 commit comments

Comments
 (0)