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

Stop ESLint from looking for a configuration file in parent folders #11695

Merged
merged 2 commits into from Nov 28, 2017

Conversation

skiritsis
Copy link
Contributor

ESLint by default searches for configurations files up to the root directory. To quote ESLint documentation

By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results.

This is not necessarily wrong, but it can definitely lead to unexpected situations such as having an invalid package.json file in any parent directory and getting an error message or even trickier ones, where a package.json file in any parent directories takes precedence and you end up with different lint rules than those those specified in the project.

By adding the 'root': true option in the configuration we limit it to the specific project.

@gaearon
Copy link
Collaborator

gaearon commented Nov 28, 2017

Yeah, this seems reasonable. Thanks.

@gaearon gaearon merged commit e5cacb2 into facebook:master Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants