Skip to content

add unsafe Effect assertion diagnostic#187

Merged
mattiamanzati merged 1 commit into
mainfrom
port-unsafe-effect-type-assertion-a5b0e47
May 10, 2026
Merged

add unsafe Effect assertion diagnostic#187
mattiamanzati merged 1 commit into
mainfrom
port-unsafe-effect-type-assertion-a5b0e47

Conversation

@mattiamanzati
Copy link
Copy Markdown
Contributor

Summary

  • port the upstream unsafeEffectTypeAssertion diagnostic into the Go implementation, including a quick-fix that removes unsafe assertions narrowing Effect error or requirements channels
  • map the per-channel explanation to related diagnostics in Go, instead of baking multiline detail into the top-level message, while preserving the underlying behavior
  • add v3/v4 fixtures, preview coverage, baselines, metadata updates, README updates, and a changeset for the new diagnostic

Validation

  • pnpm setup-repo
  • go test ./internal/effecttest -run 'TestEffectDiagnostics/unsafeEffectTypeAssertion|TestEffectV3Diagnostics/unsafeEffectTypeAssertion|TestEffectQuickFixes/unsafeEffectTypeAssertion|TestEffectV3QuickFixes/unsafeEffectTypeAssertion' -count=1
  • UPDATE_METADATA_JSON=1 go test ./internal/rules -run TestUpdateMetadataJSON -count=1
  • UPDATE_README=1 go test ./internal/rules -run TestUpdateReadme -count=1
  • go test ./internal/rules -run 'TestMetadataJSON|TestReadmeTable' -count=1
  • pnpm lint
  • pnpm check
  • pnpm test

Notes

  • The upstream TypeScript implementation formats channel details into the main diagnostic string. This Go port emits those details as related diagnostics because this repo version supports child diagnostics cleanly.

@mattiamanzati mattiamanzati merged commit 3512164 into main May 10, 2026
4 checks passed
@mattiamanzati mattiamanzati deleted the port-unsafe-effect-type-assertion-a5b0e47 branch May 10, 2026 10:56
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