Repository navigation
fix(svelte): clear the hidden lint backlog, then un-skip the gate - #363
Conversation
The package's `lint:eslint` target was declared in nx's shape (`executor` + `options.command`), which vis reports as "No command configured" — and counts as a pass. Deleting the block falls back to the manifest script, which carries `--max-warnings=0`. Clearing the backlog the gate was hiding: 20 `vitest/require-mock-type-parameters` (inline parameter annotations moved into the `vi.fn<Signature>()` type parameter) and 4 `vitest/prefer-strict-equal` (`toEqual` → `toStrictEqual`; all four compare plain object literals, so the stricter matcher passes unchanged). No rule disabled, no rule relaxed. Plan 302 phase 6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
✅ Deploy Preview for lunorash ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for following the naming conventions! 🙏 |
|
Thank you for confirming the Contributor License Agreement! 🙏 |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe Svelte project configuration now contains only package tags. The ChangesSvelte lint configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Two mock signatures described `LunoraClient` methods with fewer parameters
than the methods take, so the package documented one method three ways.
`mutation.test.ts:12` declared zero parameters while the test it backs asserts
`toHaveBeenCalledWith(fnRef, args, { shardKey })` — the type said the opposite
of the assertion. `client.mutation` is `(function_, args, options?)`.
`hydrate-preloaded.test.ts:15` declared three parameters; `hydratePreloaded`
passes four (`subscribe(functionRef, args, callback, { shardKey })`), matching
the four already declared in `query.test.ts` and `subscription.test.ts`.
Neither was a live defect — `toHaveBeenCalledWith` is not parameter-typed in
this vitest version — but a future test asserting shardKey propagation would
have failed on tuple arity rather than on the behaviour it meant to check.
The zero-arity shorthand stays at `mutation.test.ts:24`/`:48`, which only care
about the returned promise.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #363 +/- ##
========================================
Coverage ? 67.00%
========================================
Files ? 97
Lines ? 3028
Branches ? 713
========================================
Hits ? 2029
Misses ? 897
Partials ? 102 🚀 New features to boost your workflow:
|
The svelte cleanup (#363) and the guard that allowlisted it (#364) both landed, so the entry now describes an already-clean project. The check fails on a stale entry by design, which is what makes an allowlist unable to outlive its fix — so alpha went red the moment the second of the two merged, and every open PR inherits it through refs/pull/N/merge. Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What
@lunora/svelte's lint gate was reporting success after ~13 ms of doing nothing. Itsproject.jsondeclaredlint:eslintin nx's shape (executor+ nestedoptions.command), which vis does not read — it finds no top-levelcommand, printsNo command configured, and records a pass. The declared target shadowed the manifest script, so the package was never linted by the aggregate run that CI requires.This clears the hidden backlog and deletes the block, in one commit, so the gate and the cleanup land together (plan 302 phase 6).
The findings
24 problems — 0 errors, 24 warnings, failing only because the manifest script carries
--max-warnings=0. All in__tests__/, none insrc/.vitest/require-mock-type-parametersvi.fn<Signature>()type parametervitest/prefer-strict-equaltoEqual→toStrictEqualNothing disabled, no rule relaxed, no
--max-warningswidened, no test removed. The style matches the precedent set by #343 forvue/authline for line, and the sibling branch uses the same convention — one rule, one shape.The four
toStrictEqualswaps were each traced to the value's construction site rather than trusted from the autofix, since that matcher additionally checksundefined-valued keys, array sparseness and prototypes. All four actual values are plain literals or pass through by identity.toStrictEqualwas already this package's convention — 50+ existing uses, including the identical assertion shape insubscription.test.ts; these four were the stragglers.The old target could never have worked
Its command was
eslint --config {workspaceRoot}/eslint.config.js ., and there is no rooteslint.config.jsin this repo — every package carries its own. Had vis ever honoured the block it would have died withENOENT. It also dropped the--max-warnings=0the manifest script carries.Verification
pnpm --filter "@lunora/svelte" run lint:eslint/lint:types/test→ clean, clean, 18 files / 98 passedorigin/alpha's test files, restored against this branch'ssrc/, also pass 98 — so nothing here is a test that only passes after the change--max-warnings=0, which is the property the whole change exists to restorevis run lint:eslint --query "project=svelte"→ 4.7 s of real work, exit 0,No command configuredgonelint:eslintexit 0;lint:package-jsoncleanThat PR adds
scripts/check-project-json-targets.js, whoseKNOWN_UNMIGRATEDallowlist containspackages/svelte— and the check fails on a stale entry as well as a missing one, by design, so an allowlist cannot outlive its fix.This branch makes
packages/svelteclean. Whichever of the two merges second must also empty that allowlist (new Map()), orpnpm run lint:project-jsonexits 1 onalpha. It runs as the first step of the Lint workflow's eslint job, so the failure lands inside a required check and reads as "svelte lint broken" when the real cause is a stale debt marker. This branch cannot fix it itself — the script does not exist on its base.Review
Both thermo passes ran against the full branch diff. Bugs/security: clean, no findings at any actionable severity. Code quality: clean on its own merits, with the merge-order dependency above as the only blocker and two optional tidies (
mutation.test.ts:12andhydrate-preloaded.test.ts:15declare fewer parameters than the methods they stand in for — harmless today, sincetoHaveBeenCalledWithis not parameter-typed in this vitest version, which was proven by probe; the second is pre-existing onalpha).🤖 Generated with Claude Code
https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
Summary by CodeRabbit