Describe the bug
Using vscode, the svelte rules are not getting run on .svelte files when navigating around in the code base.
It is because vscodes eslint plugin does not check .svelte files.
to get it working you need to explicitly tell vscode to also check .svelte files by adding
// .vscode/settings.json
// by adding "svelte" to this list it starts working
// not sure if we can append instead of redefining.
"eslint.validate": [
"javascript",
"typescript",
"markdown",
"svelte"
],
Don't know if the above is the best solve.
but if so the .vscode/settings.json should be added to the sv create template.
Reproduction
using sv to create a new project, and the add a new component with an #each block in it without the (mything.id) key
using vscode this should warn about you not having a key.
if I run
pnpm check
it will report that the key is missing.
Logs
System Info
System:
OS: macOS 15.5
CPU: (12) arm64 Apple M2 Max
Memory: 105.02 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node
npm: 10.9.2 - ~/.nvm/versions/node/v22.16.0/bin/npm
pnpm: 10.12.4 - ~/.nvm/versions/node/v22.16.0/bin/pnpm
bun: 1.2.5 - ~/.bun/bin/bun
Browsers:
Chrome: 137.0.7151.120
Edge: 138.0.3351.55
Safari: 18.5
Safari Technology Preview: 26.0
npmPackages:
svelte: ^5.0.0 => 5.34.8
Severity
annoyance
Describe the bug
Using vscode, the svelte rules are not getting run on .svelte files when navigating around in the code base.
It is because vscodes eslint plugin does not check .svelte files.
to get it working you need to explicitly tell vscode to also check .svelte files by adding
Don't know if the above is the best solve.
but if so the .vscode/settings.json should be added to the sv create template.
Reproduction
using
svto create a new project, and the add a new component with an#eachblock in it without the (mything.id) keyusing vscode this should warn about you not having a key.
if I run
pnpm check
it will report that the key is missing.
Logs
System Info
System: OS: macOS 15.5 CPU: (12) arm64 Apple M2 Max Memory: 105.02 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node npm: 10.9.2 - ~/.nvm/versions/node/v22.16.0/bin/npm pnpm: 10.12.4 - ~/.nvm/versions/node/v22.16.0/bin/pnpm bun: 1.2.5 - ~/.bun/bin/bun Browsers: Chrome: 137.0.7151.120 Edge: 138.0.3351.55 Safari: 18.5 Safari Technology Preview: 26.0 npmPackages: svelte: ^5.0.0 => 5.34.8Severity
annoyance