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.
And also align eslint ignored files with how eslint is automatically run.
This ensures that all contributors run lint on the same set of files. Prior to this change, eslint covers ts files outside ui with its default rules, meaning contributors might commit code with fresh eslint errors that only show up when eslint is run bare, or if an eslint extension is installed in a code editor.
Because this commit adds a global ignore pattern on all folders by default, the bare
eslint
command run no longer takes additional time overeslint ui
. And the --cache flag means lint will usually be dramatically faster than before.One-off eslint checks on files in ignored directories can still be performed with:
eslint <path to file>
Pre-commit run of eslint
Post-commit run of eslint, without the ui argument. (faster because of the more efficient global ignore patterns)
Post-commit example of lint script if repeatedly run. This is much faster, thanks to --cache.
I've also added --cache to prettier format scripts. Note that while prettier automatically manages the cache for most tooling updates, it does not clear cache on prettier plugin updates (which we aren't currently using). Nonetheless, to future proof our prettier cache, I'm purposely leaving --cache off the pre-commit hook, which ensures the prettier cache will be often cleared. The cache is still useful when repeatedly running format or when using watch-format.
Post-commit example of prettier under repeated use, now much faster thanks to --cache