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

Remove svelte/html-self-closing in the future #960

Open
baseballyama opened this issue Dec 14, 2024 · 2 comments
Open

Remove svelte/html-self-closing in the future #960

baseballyama opened this issue Dec 14, 2024 · 2 comments

Comments

@baseballyama
Copy link
Member

baseballyama commented Dec 14, 2024

https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-spacing/

Currently, Svelte 5 determines whether a tag is self-closing based on whether it is a void element and issues warnings accordingly. This enforces correct HTML syntax. Therefore, I believe there is no longer a need to provide a rule for this in ESLint.
sveltejs/svelte#11114

image

However, this rule is still necessary for certain cases, such as <Component>.

@baseballyama baseballyama changed the title Remove svelte/html-closing-bracket-spacing in the future Remove svelte/html-self-closing in the future Dec 14, 2024
@baseballyama
Copy link
Member Author

Upon further investigation, it seems that the proper course of action is to improve the implementation of the rule.

@ota-meshi
Copy link
Member

ota-meshi commented Dec 16, 2024

Yeah, I think we probably need to change the default behavior of the rule.
I think the current default options are based on the old prettier-svelte plugin, but should now be changed to the new defaults.

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

2 participants