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.

if config appears in project folder, configs in home directory can't be seen totally

See original GitHub issue

Tell us about your environment Linux version 3.6.32-431.11.2.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Tue Mar 25 19:59:55 UTC 2014

  • ESLint Version: v3.11.1

  • Node Version: v7.2.0

  • npm Version: 3.10.9 What parser (default, Babel-ESLint, etc.) are you using? espree Please show your full configuration:

in .eslintrc in ~/:
{
	"env":{
		"browser":true
		,"node":true
		,"es6":true
	}
	,"extends":"eslint:recommended"
}

-----------------------------------------------------------------------------------------------
the next cause problem(if removed works as expected):
-----------------------------------------------------------------------------------------------
in project directory:

either place the following in package.json:
eslintConfig:{}

or file .eslintrc with following content exists
{}

What did you do? Please include the actual source code causing the issue.

in app.js
const a=1;


What did you expect to happen? config cascading and hierarchy take effect.

run: eslint --print-config app.js long config list shows, with the same content with when no empty config appears in project folder;

run: eslint app.js error ‘a’ is assigned a value but never used no-unused-vars

What actually happened? Please include the actual, raw output from ESLint. run: eslint --print-config app.js { “globals”: {}, “env”: {}, “rules”: {}, “parserOptions”: {} }

run: eslint app.js error Parsing error: The keyword ‘const’ is reserved

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
nzakascommented, Dec 30, 2016

I think the current behavior is correct. the home directory is a special case because it can unintentionally affect a lot of projects (iirc this was an early complaint). I think changing that now would be confusing and possibly damaging to the current user base.

I’m all for updating the docs to make this special case clearer.

3reactions
kaicataldocommented, Jul 18, 2017

@ljharb I believe the accepted resolution here is to update the docs to make it clear that the home directory is a special case. I agree with others that this is too big a breaking change to introduce now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyCharm tells me "Cannot start process, the working directory ...
It happens because when you create a file it automatically assigns the working directory to it's configuration, which of course is the one...
Read more >
Directories used by the IDE to store settings, caches, plugins ...
I find it easier to move configuration folder to another location (SSD or another drive) and just create a soft link pointing to...
Read more >
Confluence Home and other important directories
The Confluence Home directory is the folder where Confluence stores its configuration information, search indexes and page attachments.
Read more >
Managing the global packages, cache, and temp folders
The environment variable takes precedence over the configuration ... If the package is still not found, NuGet looks for the package in the ......
Read more >
Config Files - Babel.js
json files, with a "babel" key. Project-wide configuration. New in Babel 7.x, Babel has a concept of a "root" directory ...
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