fix(solid-email): silence html validation false positives#17
Open
Akin01 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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
validatecompiler option (supported bybabel-plugin-jsx-dom-expressions) even though it’s not exposed byvite-plugin-solid’s types. - Centralizes
validate: falsein a sharedemailSolidCompilerOptionsobject and applies it to both SSR and DOM builds intsdown.config.ts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
@akin01/solid-emailbuild.<Html>,<Head>,<Body>) unchanged; these intentionally render document-level roots that Solid's fragment-oriented validator reports as false positives.validatecompiler option, which is supported bybabel-plugin-jsx-dom-expressionsbut omitted fromvite-plugin-solid's exposed type.Verification
pnpm buildpnpm --filter @akin01/solid-email run buildpnpm --filter @akin01/solid-email exec vitest run src/components/html/html.spec.tsx src/components/head/head.spec.tsx src/components/body/body.spec.tsxpnpm --filter @akin01/solid-email run typecheckChecklist