我正在尝试使用create-react-app创建反应项目,但是存在eslint版本错误。我试图按照cli中列出的步骤进行操作:
删除项目文件夹中的package-lock.json(不是package.json!)和/或yarn.lock。
但是在我可以从中删除的package.json文件中的依存关系或devDependencies(在我的package.json中没有devDependencies)中都没有问题。
以下是附加的图像。 package.json image
Using create-react-app version 3.x
编辑:完成此处提到的所有内容: https://github.com/wesbos/eslint-config-wesbos/issues/17 这是我的package.json文件:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}