Open jnikula opened 11 hours ago
I tried adding warningFilter
in compilerOptions
in svelte.config.js
, and that can be used to replace the --compiler-warnings
command-line option. However, that too gets ignored when I set compilerOptions
in tsconfig.json
.
I'm pretty much lost on how all these things should be working together. Bottom line, this is blocking my Svelte 5 migration.
Please provide a reproduction repository. I have no idea what the warnings are that are supposed to not show up and what the code is that makes them appear.
The repo is https://github.com/groovescore/snooker-scoreboard and the reproduction branches there are:
npm run check
started complaining Error: 'forceConsistentCasingInFileNames' should be set inside the 'compilerOptions' object of the config json file
svelte-5
branch plus a simple attempt at moving forceConsistentCasingInFileNames
inside compilerOptions
. Leads to svelte-check --compiler-warnings
being ignored.svelte-5
branch plus first switching from --compiler-warnings
to warningFilter
, and then the same simple attempt as above. Leads to the warningFilter
being ignored.I just don't know how to both keep the warning ignores/filters I have and fix the new warning introduced during the migration.
It's not that the --compiler-warnings
is ignored when there is compilerOptions
in your tsconfig. It's because you encounter two breaking changes from svelte-check and svelte. In svelte-check v4, errors in tsconfig.json will prevent further checks. And in svelte 5, the warning is renamed.
Maybe we could map the --compiler-warnings
to its new name or issue a warning when the flag is passed with the old naming scheme, i.e., -
instead of _
. But because of how the warning filtering works, we can't map the code to the new code for you. You have to use the new names.
Describe the bug
Upgraded to svelte 5. Started getting:
Tried to move it to compilerOptions, but simply adding compilerOptions in
tsconfig.json
apparently makessvelte-check
ignore the--compiler-warnings
command-line option set inpackage.json
. I get a plethora of warnings that should've been ignored.Reproduction
Add
--compiler-warnings
option tosvelte-check
inpackage.json
to ignore some warning.Hit that warning.
Add
compilerOptions
object intsconfig.json
. The object doesn't have to have anything meaningful, simply its presence will makesvelte-check
ignore the--compiler-warnings
option.Expected behaviour
I'd expect command-line options to amend whatever is in the config file, not to be ignored. The minimum would be a warning about command-line options being incompatible with configuration.
System Info
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
No response