gpt4 book ai didi

reactjs - eslint 无法加载配置 "react-app"以从中扩展

转载 作者:行者123 更新时间:2023-12-05 04:26:50 31 4
gpt4 key购买 nike

我之前遇到过一个关于 eslint 的奇怪问题,我不得不卸载 node_modules 并执行 npm install,自从我这样做之后,我的代码中出现了以前从未遇到过的新错误。这是一个我不太清楚如何修复的错误。

ERROR in [eslint] Failed to load config "react-app" to extend from.
Referenced from: C:\Users\Justi\Downloads\package.json

这是我的 package.json 文件夹:

{
"name": "gingerrmarket",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.16",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@mui/icons-material": "^5.0.4",
"@mui/material": "^5.1.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"firebase": "^9.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-feather": "^2.0.9",
"react-router-dom": "^6.0.0",
"react-scripts": "^5.0.1",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

这是我在 babel 中的 eslint 解析器文件(我不确定它是否有用。)

   "name": "@babel/eslint-parser",
"version": "7.18.2",
"description": "ESLint parser that allows for linting of experimental syntax transformed by Babel",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "eslint/babel-eslint-parser"
},
"publishConfig": {
"access": "public"
},
"bugs": {
"url": "https://github.com/babel/babel/issues"
},
"homepage": "https://babel.dev/",
"engines": {
"node": "^10.13.0 || ^12.13.0 || >=14.0.0"
},
"main": "./lib/index.cjs",
"type": "commonjs",
"exports": {
".": "./lib/index.cjs",
"./experimental-worker": "./lib/experimental-worker.cjs",
"./package.json": "./package.json"
},
"peerDependencies": {
"@babel/core": ">=7.11.0",
"eslint": "^7.5.0 || ^8.0.0"
},
"dependencies": {
"eslint-scope": "^5.1.1",
"eslint-visitor-keys": "^2.1.0",
"semver": "^6.3.0"
},
"devDependencies": {
"@babel/core": "^7.18.2",
"dedent": "^0.7.0",
"eslint": "^7.27.0",
"eslint-8": "npm:eslint@^8.0.0"
}
}

有人有什么建议吗?请帮忙。

最佳答案

你试过运行 npm i eslint-config-react-app -D 了吗?

关于reactjs - eslint 无法加载配置 "react-app"以从中扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72924944/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com