Skip to content

Commit

Permalink
Update client dependencies to enable build
Browse files Browse the repository at this point in the history
Because "eslintConfig": { "extends": [ "react-app" ] } in package.json
would result in the following error during build:
"Failed to load config "react-app" to extend from.",
eslint-config-react-app was added as an explicit devDependency.

Because adding eslint-config-react-app as a devDependency led to
react plugin having a conflict in eslint-config-react-app packages,
the following was added to .yarnrc.yml
packageExtensions:
  react-scripts@*:
    peerDependencies:
      eslint-config-react-app: "*"

See the following for explanation of above two:
facebook/create-react-app#10463 (comment)

Becase @testing-library/jest-dom's types were recognized by
build command, @types/testing-library__jest-dom was added as
a devDependency.
  • Loading branch information
seanstern committed Jun 7, 2022
1 parent b715dfc commit 2566a9e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ plugins:
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.2.0.cjs

packageExtensions:
react-scripts@*:
peerDependencies:
eslint-config-react-app: "*"
2 changes: 2 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
},
"proxy": "http://localhost:5000",
"devDependencies": {
"@types/testing-library__jest-dom": "^5.14.3",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"prettier": "2.6.2",
"rimraf": "^3.0.2"
}
Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3960,6 +3960,15 @@ __metadata:
languageName: node
linkType: hard

"@types/testing-library__jest-dom@npm:^5.14.3":
version: 5.14.3
resolution: "@types/testing-library__jest-dom@npm:5.14.3"
dependencies:
"@types/jest": "*"
checksum: 203443d0e7e5929fbc9e441146f92d85efa033b4697e427ed0164df1c40b720b6bb9bbd96a3171ea5fd8d9301b538fd0f49d4f35594d142afd0f6d2ecac25785
languageName: node
linkType: hard

"@types/testing-library__jest-dom@npm:^5.9.1":
version: 5.9.5
resolution: "@types/testing-library__jest-dom@npm:5.9.5"
Expand Down Expand Up @@ -14158,8 +14167,10 @@ __metadata:
"@types/react": ^17.0.20
"@types/react-dom": ^17.0.9
"@types/react-router-dom": ^5.1.7
"@types/testing-library__jest-dom": ^5.14.3
axios: ^0.26.1
eslint-config-prettier: ^8.5.0
eslint-config-react-app: ^7.0.1
prettier: 2.6.2
react: ^17.0.2
react-dom: ^17.0.2
Expand Down

0 comments on commit 2566a9e

Please sign in to comment.