Skip to content

Commit

Permalink
fix: update dependencies for peerDependency warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Paul Marbach committed Jun 26, 2019
1 parent a309a20 commit eceff7c
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 98 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
],
"devDependencies": {
"@spotify/web-scripts": "^1.0.0",
"husky": "^2.4.0",
"lerna": "^3.15.0",
"prettier": "^1.18.0",
"eslint": "^5.0.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.14.2",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"typescript":"*"
"eslint": "^5.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.14.2",
"husky": "^2.4.0",
"lerna": "^3.15.0",
"prettier": "^1.18.2",
"typescript": "^3.4.3"
},
"husky": {
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Spotify's base ESLint config",
"main": "index.js",
"peerDependencies": {
"eslint": "^5.0.0"
"eslint": "5.x"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-config-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ module.exports = {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
extends: ['plugin:jsx-a11y/recommended'],
rules: {
// Prevent missing displayName in a React component definition
Expand Down
9 changes: 7 additions & 2 deletions packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
"license": "Apache-2.0",
"description": "Spotify's ESLint config for React projects",
"main": "index.js",
"peerDependencies": {
"eslint": "^5.0.0",
"devDependencies": {
"eslint": "^5.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.14.2"
},
"peerDependencies": {
"eslint": "5.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-react": ">=7.7.0 <8"
},
"publishConfig": {
"access": "public"
},
Expand Down
9 changes: 7 additions & 2 deletions packages/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
"license": "Apache-2.0",
"description": "Spotify's ESLint config for TypeScript",
"main": "index.js",
"peerDependencies": {
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"eslint": "^5.0.0"
"eslint": "^5.16.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=1.5 <2",
"@typescript-eslint/parser": ">=1.5 <2",
"eslint": "5.x"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 4 additions & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"license": "Apache-2.0",
"description": "Spotify's base Prettier config",
"main": "index.js",
"devDependencies": {
"prettier": "^1.18.2"
},
"peerDependencies": {
"prettier": "^1.18.0"
"prettier": "1.x"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 4 additions & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"test": "./run-tests.sh"
},
"devDependencies": {
"typescript": "^3.2.2"
"typescript": "^3.4.3"
},
"peerDependencies": {
"typescript": ">=3.2 <4"
},
"publishConfig": {
"access": "public"
Expand Down
12 changes: 6 additions & 6 deletions packages/web-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@
"@types/jest": "^24.0.11",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"commander": "^2.20.0",
"commitizen": "^3.1.1",
"cross-spawn-promise": "^0.10.1",
"cz-conventional-changelog": "^2.1.0",
"debug": "^4.1.1",
"eslint": "^5.15.3",
"eslint-config-prettier": "^4.1.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"jest": "^24.5.0",
"jest-junit": "^6.3.0",
"lint-staged": "^8.1.5",
"prettier": "^1.16.4",
"semantic-release": "15",
"prettier": "^1.18.2",
"semantic-release": "^15.13.17",
"ts-jest": "^24.0.2",
"typescript": "^3.4.3"
},
Expand Down
Loading

0 comments on commit eceff7c

Please sign in to comment.