eslint is not using local config
See original GitHub issueI have eslint installed globally and locally. However, the vscode plugin is not respecting the local configuration files. When running from terminal, everything works as expected however I want to use VSCode’s version that provides gutter colors and other visual indicators.
Directory structure:
|-node_modules
|-shrinkwrap.yaml
|-rollup.config.js
|-package-lock.json
|-package.json
|-lib
| |-index.js // File to lint
|-build
|-.eslintrc.json
Running eslint from terminal:
eslint --debug lib/index.js
eslint:cli CLI args: [ '--debug', 'lib/index.js' ] +0ms
eslint:cli Running on files +6ms
eslint:glob-utils Creating list of files to process. +0ms
...
eslint:cli-engine Processing /Users/levi/.../lib/index.js +0ms
eslint:cli-engine Linting /Users/levi/.../lib/index.js +1ms
eslint:config Constructing config file hierarchy for /Users/levi/.../lib +0ms
eslint:config Using .eslintrc and package.json files +0ms
eslint:config Loading/Users/levi/.../myProject/.eslintrc.json +2ms
eslint:config-file Loading JSON config file: /Users/levi/.../myProject/.eslintrc.json +0ms
...
eslint:linter Linting code for /Users/levi/.../myProject/lib/index.js (pass 1) +0ms
eslint:linter Generating fixed text for /Users/levi/.../myProject/lib/index.js (pass 1) +91ms
eslint:source-code-fixer Applying fixes +0ms
eslint:source-code-fixer shouldFix parameter was false, not attempting fixes +0ms
eslint:cli-engine Linting complete in: 567ms +554ms
/Users/levi/.../myProject/lib/index.js
20:7 warning Unexpected console statement no-console
✖ 1 problem (0 errors, 1 warning)
Global linter used: (local .eslintrc.json
has "prefer-template": ["off"],"
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
eslint is not using local config · Issue #636 - GitHub
js This can happen for a couple of reasons: 1. The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc)....
Read more >VSCode eslint is not using local config with vue3
Enter > followed by ESLint: Restart ESLint Server . The other errors are easily fixed by running this command from a terminal: npm...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >ESLint not working in VSCode? Help build a troubleshooting ...
Try setting up your ESLint config from scratch. Remove everything ESLint related and start from scratch using the eslint --init command that ...
Read more >Local Install of ESLint Breaks In-Editor Linting
It means that there is something wrong in VS because it doesn't use correct Node JS version for ESLint (it ignores settings in...
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
@bugs181 can you provide me with a GitHub repository that I can clone that demos this behaviour.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!