Skip to content

fix: load config "react-app" error #11367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/cra-template-typescript/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"@types/react-dom": "^17.0.0",
"@types/jest": "^26.0.15",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
"web-vitals": "^1.0.1",
"eslint-config-react-app": "^6.0.0"
},
"eslintConfig": {
"extends": ["react-app", "react-app/jest"]
Expand Down
3 changes: 2 additions & 1 deletion packages/cra-template/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"web-vitals": "^1.0.1"
"web-vitals": "^1.0.1",
"eslint-config-react-app": "^6.0.0"
},
"eslintConfig": {
"extends": ["react-app", "react-app/jest"]
Expand Down
4 changes: 2 additions & 2 deletions tasks/e2e-installs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function exists {
# Check for accidental dependencies in package.json
function checkDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(react(-dom|-scripts)?)"'; then
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|eslint-config-react-app|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
Expand All @@ -62,7 +62,7 @@ function checkDependencies {
# Check for accidental dependencies in package.json
function checkTypeScriptDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(@types\/.+)|typescript|(react(-dom|-scripts)?)"'; then
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|eslint-config-react-app|(@types\/.+)|typescript|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
Expand Down