![](/img/trans.png)
[英]eslint command fails on CI Server with error “ESLint couldn't find the config ”standard“ to extend from”
[英]ESLint couldn't find the config "airbnb-base" to extend from
在 folder1 中,我执行了“npm install”,运行“eslint --ext.js”,一切正常。
然后我将所有子文件夹/文件从文件夹 1 复制到文件夹 2,包括 .eslintrc、.jest、.npmrc、package.json、package-lock.json。 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.
这怎么会发生? 请问如何解决这个问题? folder1 中的 eslint 具有相同的版本。
好的,对于 folder2,package.json 确实缺少 eslint-config-airbnb-base。 添加它并工作。 不确定为什么 folder1 起作用,可能是从其父文件夹中获取的。
您可以删除 folder2 的父亲中的“ .eslintrc ”!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.