Is ignoring errors supported in VS code/svelte-check?
See original GitHub issueI have an expected error that I’d like the language server & svelte-check to ignore. I have if (import.meta.env.NODE_ENV === "development")
where import.meta.env.NODE_ENV
is replaced at build time by Vite.
I couldn’t find how to ignore errors documented anywhere. If it’s not supported, consider this a feature request. It’d nice to be able to use something like // @svelte-ignore
.
For my use-case, I could easily create a svelte.config.js
, and use rollup-plugin-replace
to help the language server out. The severity of this low. It’s just more a bit more convenient.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Ignoring Errors with Flake8 — flake8 3.1.1 documentation
This tells Flake8 to ignore any error codes starting with E1 , E23 , or W503 while it is running. Note. The documentation...
Read more >Manage errors in APM: Collect, ignore, or mark as expected
Go to the Server-side configuration menu for the application that has errors that you want to ignore. Under Error collection, look for Ignore...
Read more >Ignoring Errors - TrackJS Docs
Errors Ignored by a rule are removed before your account is subject to throttling limits, so it's a good idea to ignore unactionable...
Read more >Ignoring Errors - PHPStan
To ignore errors by a regular expression only in a specific file, add an entry with message or messages and path or paths...
Read more >How to: Ignore Errors in Tasks - MSBuild | Microsoft Learn
Learn how to ignore errors in MSBuild tasks, and control whether a build stops or continues when a task failure occurs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
VS Code:
//@ts-ignore
to silence single errors//@ts-nocheck
to silence a whole filesvelte-check
://@ts-ignore
to silence single errors//@ts-nocheck
to silence a whole fileFor your specific case, do
I see. Is there a workaround you can think of?
Aside from
@ts-nocheck
ing the whole file, and aside from just fixing the error, of course.