Repository navigation
lint: stop loading type information that no rule uses - #418
Merged
Merged
Conversation
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The lint step in CI ran out of JavaScript heap memory on several runs today (for example run 43965363173 on #412).
eslint.config.jssetparserOptions.projectService: true, which makes typescript-eslint build TypeScript programs for every package in the monorepo. No rule in the config needs type information:tseslint.configs.recommendedis the set without type checks, and the react-hooks rules do not use types either. So the setting only cost memory, and the cost grows with the repository.This removes the setting. On main,
eslint .gives exactly the same messages before and after (0 errors, 168 warnings, identical file, rule and line for each), and its peak memory falls from about 3.9 GB to 0.7 GB (13 s to 2.6 s locally).If we later want type-aware rules, we can turn the project service back on together with those rules.