Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<tr> is invalid inside <table> #15622

Open
sexnine opened this issue Mar 27, 2025 · 2 comments
Open

<tr> is invalid inside <table> #15622

sexnine opened this issue Mar 27, 2025 · 2 comments

Comments

@sexnine
Copy link

sexnine commented Mar 27, 2025

Describe the bug

Because of the new node_invalid_placement rule. Svelte throws errors when using a <tr> inside a <table>.

This should be allowed, even mdn has an example using those elements this way but svelte throws an error about it.


Side note: Implementing this rule is one of the worst things svelte has ever done. Throw a warning sure, but throwing an error is overreaching for a JS framework. I do not want a framework to force me to write HTML "correctly".

Reproduction

https://svelte.dev/playground/hello-world?version=5.25.3#H4sIAAAAAAAACm3LQQrCMBRF0a2UN1IIdh5CwZl7sA5S8wuBb1qSZ6uU7l2COHN6uHdD8g-BxUVUp2adsobmICFSwhEGY1QpsNcNfM-1qwDzu87zfCqLKKsNvsg_v0-Jklhg4egHla5PPR1z51rmrk-u_TIMKC_CMj9lvxnQR11jCrCj1yL7BwjxYu2uAAAA

Logs

System Info

N/A

Severity

annoyance

@Conduitry
Copy link
Member

See #9785. This is unlikely to change, but we should perhaps document it.

@dummdidumm
Copy link
Member

It somewhat is in https://svelte.dev/docs/svelte/compiler-errors#node_invalid_placement - not sure if that's enough or if it should be made more explicit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants