.eslintrc is ignored when cwd is the home directory #3846
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
core
Relates to ESLint's core APIs and features
Given the following directory structure:
where
/app
is the home directory of the current user AND the current working directory of the eslint process.When I run
DEBUG=eslint:* eslint /app/lib/foo.js
, I get the following output:As you can see,
/app/lib/.eslintrc
is used but not/app/.eslintrc
. This is because.eslintrc
files in the home directory are always ignored when retrieving the local config for a given file. The documentation says that this should only happen in the absence of ANY configuration.When I remove
/app/lib/.eslintrc
then I get the following output:Now the personal config was used because no other
.eslintrc
was found, which is not correct because there is a config file in the current working directory.My current workaround is to rename the
/app/.eslintrc
file to/app/eslint-config
and load it explicitly via the-c
CLI flag:The text was updated successfully, but these errors were encountered: