breaking: warn on self-closing non-void HTML tags#11114
Conversation
🦋 Changeset detectedLatest commit: bc8232b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Added a migration helper sveltejs/kit#12102 |
|
marking draft until sveltejs/kit#12102 (which is blocked on some prettier nonsense) can be merged |
Companion to sveltejs/svelte#11114. This adds an npx svelte-migrate self-closing-tags migration that replaces all the self-closing non-void elements in your .svelte files.
Companion to sveltejs/svelte#11114. This adds an npx svelte-migrate self-closing-tags migration that replaces all the self-closing non-void elements in your .svelte files.
* feat: add self-closing-tags migration Companion to sveltejs/svelte#11114. This adds an npx svelte-migrate self-closing-tags migration that replaces all the self-closing non-void elements in your .svelte files. * use local Svelte installation
|
Wouldn't it be good to have something like "This acts as an opening tag." in the warning? |
|
@Rich-Harris am I missing something or is this PR breaking using Svelte in XHTML contexts? It seems to be no longer possible now to inject a Svelte component e.g. with an |
|
No, it's unrelated. This PR is purely about authoring, not output |
Closes #11052. It might be worth us creating a
npx svelte-migrate self-closing-tagsutility before releasing thisBefore submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.Tests and linting
pnpm testand lint the project withpnpm lint