This repository was archived by the owner on Feb 18, 2024. It is now read-only.
Specify root option in eslintrc templates #1039
Closed
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.
Fixes #973.
I'm not sure how this wasn't happening before, but when running without the
--no-eslintrc
bits in the precommit I would get errors around eslint being unable to load the config file. I think this was related to eslint trying to load these nested eslintrc files to lint their subdirectories, which we definitely don't want during development.So now I added
--no-eslintrc -c ./.eslintrc.js
so it will lint the monorepo using only our top-level eslintrc. When you run it like this though, eslint gives you warnings that the create-project eslintrc files are ignored by default, so the eslintignore line addition is to add these back to being linted, but not used as config.