Split prettier/eslint CI jobs, unmask lint caches, require checks to merge - #537
Merged
Merged
Conversation
…merge The lint job cached .eslintcache and node_modules/.cache/prettier with a bare lint- restore-key, so restored caches marked files clean against a stale tool version/config: main passed lint while a cold-cache run fails. It also carried continue-on-error, so failures never blocked anything. - Split lint into parallel prettier and eslint jobs so one failing never masks the other - Drop the lint result caches in CI entirely; run bunx prettier --check . and bunx eslint . un-cached (local lint script keeps --cache for speed) - Remove continue-on-error; these jobs become required status checks
Keep the two stylistic rules as warnings: ~1200 pre-existing non-null assertions and empty functions are a backlog, not a merge-queue blocker. The leftover unused-vars, unused-expressions, and related errors were real and are fixed here so prettier and eslint can report as required checks. Amp-Thread-ID: https://ampcode.com/threads/T-01a02c68-0d8d-777b-b717-81fb9a282023 Co-authored-by: Amp <amp@ampcode.com>
2 tasks
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.
Problem
The CI
lintjob ranbun run lint(prettier --check --cache . && eslint --cache .) with a results cache keyedlint-${{ github.sha }}plus a barelint-restore-key. A restored cache marks files clean that are NOT clean at the current tool version/config, so main passed lint while any cold-cache run fails with ~605 prettier drift files and thousands of eslint errors. The job also hadcontinue-on-error: true, so nothing blocked merge anyway.Changes
lintinto two parallel jobs:prettier(bunx prettier --check .) andeslint(bunx eslint .), so one failing cannot mask or be conflated with the other.--cacheflags in package.json'slintscript are unchanged for local speed; CI runs the un-cached commands directly.continue-on-error— these jobs now fail the run.bun.lock) is kept — that one is sound.typecheckandbuild-and-testjobs untouched; the aggregatebun run checkscript still runsbun run lintand stays coherent.Branch protection
The
protect-mainruleset is being updated soprettier,eslint,typecheck, andbuild-and-testare required status checks blocking merge to main.Coordination
Until the companion formatting PR (branch
format-eslint-first-pass) merges, the new strict prettier/eslint jobs will fail on every branch — including this one. The required-checks flip is still safe to apply immediately: nothing can merge green until the format pass lands, which is the intended state.