Repository navigation
refactor: effect/imperative-loops out of tests and examples (2 of 2) - #613
Merged
Merged
Conversation
…rative-loops, 2 of 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PMempKsgjiV1NDcCJY
Delete the warn line: the rule has no sites left in the repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PMempKsgjiV1NDcCJY
…ammar fixture Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PMempKsgjiV1NDcCJY
thomasfosterau
force-pushed
the
lint-imperative-loops-tests
branch
from
November 12, 2026 06:15
b914052 to
c38c968
Compare
|
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
Part of #533. Second half of the
effect/imperative-loopswork; the first half, the non-testsrc/files, landed as #611. This PR converts the remaining 98 sites insrc/*.test.ts(73),examples/(22) andtest/entry-points.test.ts(3), touching only those files, and deletes the rule'swarnline invite.config.ts, so the rule now runs at the preset'serror.Site count (
vp lint, whole repo):effect/imperative-loops98 -> 0, and 0 lint errors. No other rule gained a site in the touched files.Conversions:
Arr.forEach, withcontinueturned intoreturn.Arr.findFirst/Arr.some/Arr.takeWhile: the example handlers' duplicate-title and duplicate-name checks, the conformance fixtures' reject-on-first-bad-key walks and sort comparator, andmediaTypeParameters.Arr.reducein the blog example and anArr.forEachover the same array in the github and northwind examples, as before.Arr.forEachover the segments or instants.Promise.all(... .map(async ...)).vite.config.tshad no count comments citing this rule.Verification
Run on the branch rebased onto
origin/trunk(which includes #611), withGOMAXPROCS=2 GOMEMLIMIT=3GiBand--concurrency-limit 1.pnpm install --frozen-lockfile: passvp run build: passvp check: passvp run check: passvp run -r test:unit: pass (4006 passed in the root suite; examples 73, 50 and 56 passed)vp run docgen: passvp run test:coverage(4006 passed), thenvp exec fallow audit --base origin/trunk: verdictwarn, notfail. It reports one introduced complexity finding (a CRAP score of 56.3 on the conformance test fixture whose loops becamefindFirstclosures) and two duplication groups among the example handlers' sort helpers. These are test and example code only, and the sort loops were already cloned between examples before this change.Changeset
None. This is an internal refactor of tests and examples with no change to published behaviour.
.changeset/for every change to published behaviour (n/a)Notes
Generated by Claude Code