Skip to content

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.

3 participants