简体   繁体   中英

ESLint couldn't find the config "airbnb-base" to extend from

in folder1, i did "npm install", run "eslint --ext.js.", all good.

Then i copied all the subfolder/files from folder1 to folder2, including.eslintrc, .jest, .npmrc, package.json, package-lock.json. After npm install, i got this

> 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.

ok, for folder2, the package.json did miss eslint-config-airbnb-base. Added it and worked. Not sure why folder1 worked, maybe got from its parent folder.

You can delete ' .eslintrc ' in the father of the folder2!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM