![](/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.