Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working directory isn't set on the root directory with multiple eslintrc files #91

Open
alatimier opened this issue Jan 4, 2021 · 0 comments

Comments

@alatimier
Copy link

In a project with multiple eslintrc files, the eslint working directory is set on the closest eslintrc file directory instead of the root eslintrc file directory.

For exemple with this project structure :

app/
  .eslintrc.json
  test/
      .eslintrc.json
      my-test.spec.js

ESLint working directory is the 'test' directory instead of 'app' and paths in parent configuration are then broken :

"import/no-extraneous-dependencies": ["error", {
	"devDependencies": [
		"test/**/*.js"
	]
}],

This results in having extra warnings in the IDE that should not be there.

Quick fix is to manually set the working directory on the app directory but having to change it for every project is cumbersome. Especially in a lambda environnement where we have many projects.

Thanks for the consideration.
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant