Skip to content

Ratchet unicorn/prefer-type-literal-last to error#282

Merged
twschiller merged 1 commit into
mainfrom
ratchet-unicorn-type-literal-last
Jun 22, 2026
Merged

Ratchet unicorn/prefer-type-literal-last to error#282
twschiller merged 1 commit into
mainfrom
ratchet-unicorn-type-literal-last

Conversation

@twschiller

Copy link
Copy Markdown
Contributor

Third ratchet from #279 (now that #280 and #281 have merged, this targets main).

Type-only change: the five flagged sites are all { type: "…" } & EventType intersections, reordered so the object type literal comes last (EventType & { type: "…" }). Intersection is commutative — zero runtime or type-checking behavior change.

  • detection-messages.tsDebugTraceEntry union (3 members)
  • rule-count.test.ts, trace-mutation.test.ts — type-guard predicates

eslint.config.js: rule removed from the warn list → reverts to unicorn/recommended default (error).

Verification: typecheck clean, check exit 0 (0 violations), test 2059/2059 pass.

Refs #279

Third ratchet from #279. Type-only change: reorder the five
`{ type: "…" } & EventType` intersections so the object type literal
comes last (`EventType & { type: "…" }`). Intersection is commutative,
so this is purely cosmetic — no runtime or type-checking behavior change.

- detection-messages.ts: DebugTraceEntry union (3 members)
- rule-count.test.ts, trace-mutation.test.ts: type-guard predicates

Rule reverts to its unicorn/recommended default (error).

Refs #279

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-browser-shield-demo-site Ready Ready Preview, Comment Jun 22, 2026 11:31am

Request Review

@twschiller twschiller merged commit b0b7355 into main Jun 22, 2026
7 checks passed
@twschiller twschiller deleted the ratchet-unicorn-type-literal-last branch June 22, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant