Skip to content

fix(solid-email): silence html validation false positives#17

Open
Akin01 wants to merge 1 commit into
mainfrom
fix/solid-email-html-validation-warning
Open

fix(solid-email): silence html validation false positives#17
Akin01 wants to merge 1 commit into
mainfrom
fix/solid-email-html-validation-warning

Conversation

@Akin01

@Akin01 Akin01 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Disable Solid's compiler malformed-template validator for the @akin01/solid-email build.
  • Keep email document primitives (<Html>, <Head>, <Body>) unchanged; these intentionally render document-level roots that Solid's fragment-oriented validator reports as false positives.
  • Add a local type extension for the underlying validate compiler option, which is supported by babel-plugin-jsx-dom-expressions but omitted from vite-plugin-solid's exposed type.

Verification

  • pnpm build
  • pnpm --filter @akin01/solid-email run build
  • pnpm --filter @akin01/solid-email exec vitest run src/components/html/html.spec.tsx src/components/head/head.spec.tsx src/components/body/body.spec.tsx
  • pnpm --filter @akin01/solid-email run typecheck

Checklist

  • Tests or examples cover the changed behavior.
  • Types were checked without suppressions.
  • Public API changes are reflected in docs or examples. No public API changes.

@Akin01 Akin01 changed the title fix: silence email html validation false positives fix(solid-email): silence html validation false positives Jul 5, 2026
@Akin01 Akin01 self-assigned this Jul 5, 2026
@Akin01 Akin01 requested a review from Copilot July 5, 2026 02:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @akin01/solid-email build configuration to silence Solid compiler “malformed template” validation false positives that arise from intentionally rendering document-level roots (<html>, <head>, <body>) in email primitives, while keeping those primitives unchanged.

Changes:

  • Adds a local type extension to allow the validate compiler option (supported by babel-plugin-jsx-dom-expressions) even though it’s not exposed by vite-plugin-solid’s types.
  • Centralizes validate: false in a shared emailSolidCompilerOptions object and applies it to both SSR and DOM builds in tsdown.config.ts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants