-
-
Notifications
You must be signed in to change notification settings - Fork 209
Use onwarn and other options from svelte.config.js for every tool #855
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
Comments
Males sense to me. I imagine the hard part will be agreeing on naming / how exactly it should be specified |
It makes sense for things like warnings. I disagree that all language server settings should be read from it, that should be the responsibility of the IDE to provide those and integrate with the language server. |
So using onwarn in it's current form is acceptable direction to go ? The reason for having maybe not all, but some configuration for language server in |
Formatting options should be put into a |
I have prettier as a pre-commit hook. Configuration is in {
"prettier": {
"singleQuote": true,
"printWidth": 80,
"plugins": [
"prettier-plugin-svelte"
]
}
} Is there something special in prettier invocation from the LS? Or it should load this configuration like it usually does? 🤔 |
This will work, too. My point was that the formatting options should not be the concern of |
I agree, now I don't see anything else other than There's not much to decide left. Do making |
I'm rather concerned about adding |
So the solution is:
Looks like the only thing worth modifying is Other than |
Candidates for harmonization of onwarn in my opinion are: language-server, svelte-check, rollup plugin, webpack plugin. |
Not sure if I'm having a related issue. I want to turn off CSS unused selector stripping since I'm including markup dynamically using |
It doesn't make sense to hide this warning in this context. As far as I know, The scoped CSS won't apply to elements injected by |
In Svelte 5 you will be able to disable Svelte warnings through the new // svelte.config.js
export default {
compilerOptions: {
// disable all warnings coming from node_modules and all accessibility warnings
warningFilter: (warning) => !warning.filename?.includes('node_modules') && !warning.code.startsWith('a11y')
}
} |
Currently there are three places where I should configure ignores for svelte's a11y warnings:
language server
svelte-check, which makes
package.json
look ugly when configured and this is only place to configure iteslint
I would love to configure it in one place:
svelte.config.js
. It can't be avoided because ofsvelte-preprocess
and also these tools are reading it anyway forsvelte-preprocess
, why not use it foronwarn
?Also in the current situation I can't make per-project configurations for language server.
Ideally, I would like to use
svelte.config.js
both in language tools and bundler and configure everything svelte-related there.This stuff too: https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode#settings
The text was updated successfully, but these errors were encountered: