Speed up frontend linting and trim the Linting CI job#14853
Draft
rtibbles wants to merge 4 commits into
Draft
Conversation
Contributor
npm Package VersionsMerging this PR will publish the following packages to npm:
|
Contributor
Build Artifacts
Smoke test screenshot |
import-x/namespace deep-walks each imported module's export graph to validate `import * as ns` member access — roughly 47% of all ESLint rule time, for little value: the webpack build and tests already catch bad namespace access. import-x/named (validating named imports) is kept; it is far cheaper and higher value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
prettierFormat returned the prettier.format() promise from inside its try block without awaiting it, so a parse-error rejection escaped the catch and surfaced as an unhandled rejection instead of the intended "Parsing error during prettier formatting" message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
uv run prek syncs the dev group and fetches Python on demand, so the explicit uv python install and uv sync --group dev steps were unnecessary.
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.
Summary
Speeds up frontend linting, locally and in CI, with three changes:
import-x/namespace— it deep-walks every imported module's export graph to validateimport * as nsmember access, costing ~47% of all ESLint rule time for little value (the webpack build and tests already catch bad namespace access).import-x/namedis kept — far cheaper, higher value.uv run preksyncs the dev group and fetches Python on demand, so the separateuv python installanduv sync --group dev(~58s, present only to obtain prek) steps were redundant. The Node toolchain is kept for the hooks that need it.prettierFormat— it returned theprettier.format()promise from inside itstrywithoutawait, so parse-error rejections escaped the catch.References
No tracking issue — performance follow-up from profiling the Linting CI job.
Reviewer guidance
uv-lockand thepython-based hooks, now that the explicituv syncis gone anduv run preksyncs on demand).import-x/namespaceonly removesimport * as nsmember checks;import-x/namedstill catches missing named imports.AI usage
I used Claude Code to profile the linting, identify that
import-x/namespacedominated ESLint rule time, and draft these changes. I directed the investigation and the decisions (which rule to drop, dropping the redundant Python/dev-deps install steps), reviewed each diff, and confirmed the lint hook still passes locally.