-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Svelte 5: svelte-ignore not working #11414
Comments
Error and warning codes were switched to snake style: |
We should either update the "Various error and warning codes have been renamed slightly." note in the docs to say that all error and warning codes have been changed from kebab case to snake case, or we should have |
For DX, it would be best to map the old codes to the new ones but emit a warning about using old codes. |
Alternatively, a migration script could be added, similar to the self-closing tags, to take care of it. |
I tried updating to the new codes, and it's not working for 2 main reasons:
Personally, I think that this breaks a lot of things, possibly more than initially thought, and I don't really see a valid reason for this change? Especially when every other tool I can think of uses kebab-case for its comments. Could this potentially be reverted/modified to accept using the old style comments without warnings? |
Update: I updated ESLint & its svelte plugin to latest version, they now support the snake_case error IDs. However, it seems like it's not very consistent. It works for almost all cases, but the following still fails: <!-- svelte-ignore a11y_autofocus -->
<input type="text" autofocus style="display: none" /> $ svelte-check
Warn: Avoid using autofocus (svelte)
<!-- svelte-ignore a11y_autofocus -->
<input type="text" autofocus style="display: none" /> Others, like |
|
Related to #11414 --------- Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Closed by #11549 |
Describe the bug
It seems like
svelte-ignore
comments are not working since I upgraded to Svelte 5 -svelte-check
and my IDE are spewing out errors/warnings where there were none before. This may seem like something small but currently it's blocking my CI and I'm not sure how to fix it, this is why it put this severity.Reproduction
Logs
Warn: `<div>` with a mousedown or mouseup handler must have an ARIA role (svelte) [...]
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: