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.

Can eslint use a global `.eslintrc` file?

See original GitHub issue

Can eslint use a global file? when I create a new project, I have to run eslint --init in each project, how do I let eslint use a global .eslintrc file?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

54reactions
btmillscommented, Sep 6, 2015

If eslint doesn’t find a .eslintrc anywhere in your project, it will look for one in your home directory (~/.eslintrc or C:\Users\username\.eslintrc).

4reactions
jurajpetrikcommented, Jun 8, 2016

I was having an issue with eslint seemingly ignoring my ~/.eslintrc and it looks like eslint searches recursively upwards the path tree until it finds .eslintrc. E.g I was running eslint from ~/src/project/ and had placed an .eslintrc file in ~/src by accident. which was overriding my config file in the home directory. I hope this helps someone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I get my projects to use a global .eslintrc file by default?
Go to settings --> packages --> linter-eslint settings. On that menu, look for the .eslintrc Path option. For your particular preference, ...
Read more >
Configuring ESLint - 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 >
JavaScript: ESLint Global Configuration Setup (VSCode)
ESLint is a famous and widely used JavaScript linter that allows the user to create a configuration to their liking and enforce it...
Read more >
Setting Up ESLint Globally - Tracy Lum
Create a file called .eslintrc in your home directory. This can also be any parent directory that contains all of your work. I...
Read more >
How to Set Up ESLint Globally with VSCode - Stanley Ulili
When you set up the .eslintrc in the home directory, ESLint will use the configuration file as the default for every project you...
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