-
Notifications
You must be signed in to change notification settings - Fork 98
Adjust quoting behavior, adjust/remove strict option #348
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
Labels
Comments
dummdidumm
added a commit
that referenced
this issue
Jul 14, 2023
- add `svelteSelfCloseComponents` and `svelteSelfCloseElements` to specify whether or not empty elements/components should self-close. `svelteStrictMode` no longer has any effect on this behavior - `svelteAllowShorthand` now takes precedence over `svelteStrictMode`, which no longer has any effect on that behavior - `svelteStrictMode` is deprecated as future Svelte versions might coerce numbers coming from mustache tags inside strings into strings closes #348 closes #284 closes #279 closes #238 related to #377
dummdidumm
added a commit
that referenced
this issue
Jul 14, 2023
- whether or not empty elements/components should self-close is now left to the user - in other words, if you write `<div />` or `<Component />` that stays as is, and so does `<div></div>`/`<Component></Component>`. `svelteStrictMode` no longer has any effect on this behavior - `svelteAllowShorthand` now takes precedence over `svelteStrictMode`, which no longer has any effect on that behavior - `svelteStrictMode` is deprecated as future Svelte versions might coerce numbers coming from mustache tags inside strings into strings closes #348 closes #284 closes #279 closes #238 related to #377 superseeds / closes #379 as less options = better
dummdidumm
added a commit
that referenced
this issue
Jul 17, 2023
- whether or not empty elements/components should self-close is now left to the user - in other words, if you write `<div />` or `<Component />` that stays as is, and so does `<div></div>`/`<Component></Component>`. `svelteStrictMode` only has effect on elements (not allowing self-closing non-void-ones) - `svelteAllowShorthand` now takes precedence over `svelteStrictMode`, which no longer has any effect on that behavior closes #284 closes #279 closes #238 related to #348 related to #377 superseeds / closes #379 as less options = better
We decided to keep strict mode around (not deprecate it) and not adjust the quoting behavior yet, as it needs more consensus/thought. Self-closing tags are now left as-is for components, strict mode still disallows non-void dom elements to self-close. |
Will this be reconsidered after sveltejs/svelte#11052 happening? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove the "always quote things" option because it's technically invalid: sveltejs/svelte#7925
This means we should likely deprecate the strict mode option altogether in favor of a more fine grained set of options around self closing tags, shorthand props etc.
The text was updated successfully, but these errors were encountered: