[6.7] running eslint through npm script throws error.
See original GitHub issueI don’t experience the issue when using eslint v6.6.x.
I have the following script in my package.json:
"scripts": {
"lint": "eslint ."
},
If I run eslint .
directly in the console it works correctly, but when I run npm run lint
, it throws an error. It seems like it’s using the wrong config?
ESLint: 6.7.1.
ESLint couldn't find the config "adpyke-es6" to extend from. Please check that the name of the config is correct.
The config "adpyke-es6" was referenced from the config file in "C:\Users\pykea\.eslintrc".
If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Error while npm run build? eslint package error - Stack Overflow
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >eslint/eslint - Gitter
I am having an issue with ESLint while deploying my react app to Heroku. I am getting this error "Oops! Something went wrong!...
Read more >ESLint Error at npm start --open - Material Design for Bootstrap
Hello, im getting the following error when im afther unzipping the folder and running npm start --open. " ERROR Failed to compile with...
Read more >NPM — How to Run ESLint --fix From npm Script - Future Studio
This tutorial shows you how to run ESLint with the --fix flag from an NPM script. NPM Quick Tips Series Overview. NPM Quick...
Read more >eslint-config-prettier | Yarn - Package Manager
Turns off all rules that are unnecessary or might conflict with [Prettier]. This lets you use your favorite shareable config without letting its...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Side note: As you may know, we have deprecated the config files in HOME directory. The error of this issue looks like thrown from unused config files in HOME directory (because it should not work since ESLint 6.0.0, I guess that you have not used it while a time), therefore I’d like to recommend to remove it.
Ah, OK, I have found what it happens. Thank you for providing the information.
This happens under the following conditions:
eslint .
).In the situation, first, ESLint has checked if the directory is ignored or not. Previously this process loads only
.eslintignore
. But since 6.7.0, this process additionally loads config files from the directory that the project directory exists because it usesignorePatterns
property of config files. If config files were not found in the directory that the project directory exists, it loads the config file in the HOME directory.I think it’s not intuitive if
eslint .
command loads config files from outside of the project directory.