svelte-vscode does not support new warning names
Closed this issue · 2 comments
shadow-identity commented
Describe the bug
VScode highlights "wrong" code even if it was ignored using new warning names (with underscores).
Reproduction
- Use this component
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<md-menu-item on:click={() => {}></ md-menu-item>
- Observe VSCode warnings:
A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.svelte(a11y-click-events-have-key-events)
A11y: <md-menu-item> with click handler must have an ARIA rolesvelte(a11y-no-static-element-interactions)
- Run
svelte-check
andeslint .
, ensure that there is no actual warning. - Use Quick Fix (it generates svelte-ignore comments)
- Generated comments are old-styled, making
eslint-plugin-svelte
to cry.
Expected behaviour
VSCode should not report an error if it is ignored
System Info
- @sveltejs/kit@2.5.7
- @sveltejs/vite-plugin-svelte@4.0.0-next.1
- svelte@5.0.0-next.133
- vite@5.0.10
- eslint-plugin-svelte@2.39.0
- svelte-check@^3.7.1
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
![image](https://private-user-images.githubusercontent.com/1223112/331291709-3f2d9c11-499a-44c9-b11d-d81a17ac7e31.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1ODIwNzMsIm5iZiI6MTcyMDU4MTc3MywicGF0aCI6Ii8xMjIzMTEyLzMzMTI5MTcwOS0zZjJkOWMxMS00OTlhLTQ0YzktYjExZC1kODFhMTdhYzdlMzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTBUMDMyMjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDZjOTViOTdhMmI2YTQ1N2M3OWI1YzNmZDM4N2ZiNGEwODdhZmMwZmFkYzgyN2Q4ZTgyMzdkMmRjOTI2NzYzOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.BeBJdOieGtJAT6q8yPJ-0CKd3B7iY5yVz-P2m2GKdpo)
jasonlyu123 commented
The svelte compiler provides the a11y warnings. So you're likely running an older version of the svelte compiler in your editor. Typically this is because:
- You updated the compiler while the language server is running. This will require a language server restart. This is probably the most likely situation.
- You have Restricted Mode enabled.
- Your local Svelte can't be loaded. It's likely because it is a dependency of other libraries and you're using pnpm.
In 2 and 3, the language server only uses the bundled Svelte 3. If none of this applies, Please provide a reproduction repository.
shadow-identity commented
Thanks, that was the first case. After the VS Code window reloading it does not report the warning anymore. From my point of view, the issue can be closed.