[英]ESLint couldn't find the config "airbnb-base" to extend from
in folder1, i did "npm install", run "eslint --ext.js.", all good.在 folder1 中,我执行了“npm install”,运行“eslint --ext.js”,一切正常。
Then i copied all the subfolder/files from folder1 to folder2, including.eslintrc, .jest, .npmrc, package.json, package-lock.json.然后我将所有子文件夹/文件从文件夹 1 复制到文件夹 2,包括 .eslintrc、.jest、.npmrc、package.json、package-lock.json。 After npm install, i got this
npm 安装后,我得到了这个
> eslint --ext .js .
Oops! Something went wrong! :(
ESLint: 7.32.0
ESLint couldn't find the config "airbnb-base" to extend from. Please check that the name of the config is correct.
How can this happen?这怎么会发生? how to fix this pls?
请问如何解决这个问题? The eslint in folder1 has the same version.
folder1 中的 eslint 具有相同的版本。
ok, for folder2, the package.json did miss eslint-config-airbnb-base.好的,对于 folder2,package.json 确实缺少 eslint-config-airbnb-base。 Added it and worked.
添加它并工作。 Not sure why folder1 worked, maybe got from its parent folder.
不确定为什么 folder1 起作用,可能是从其父文件夹中获取的。
You can delete ' .eslintrc ' in the father of the folder2!您可以删除 folder2 的父亲中的“ .eslintrc ”!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.