Stop ESLint from looking for a configuration file in parent folders #11695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ESLint by default searches for configurations files up to the root directory. To quote ESLint documentation
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.