question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint is not using local config

See original GitHub issue

I 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"]," eslint

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Mar 1, 2019

@bugs181 can you provide me with a GitHub repository that I can clone that demos this behaviour.

0reactions
vscodebot[bot]commented, Apr 1, 2019

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!

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found