Fix svelte linting in vscode

This commit is contained in:
hensm
2022-06-03 21:02:52 +01:00
parent 079adc2f68
commit 2496db38ff
3 changed files with 12 additions and 5 deletions

View File

@@ -21,7 +21,7 @@
}, },
"overrides": [ "overrides": [
{ {
"files": ["*/bin/**/*.js"], "files": ["**/*.js"],
"env": { "env": {
"node": true "node": true
} }
@@ -34,10 +34,10 @@
} }
}, },
{ {
"files": ["**/*.ts"], "files": ["**/*.ts", "ext/**/*.svelte"],
"extends": "plugin:@typescript-eslint/recommended", "extends": "plugin:@typescript-eslint/recommended",
"rules": { "rules": {
"@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [ "@typescript-eslint/no-unused-vars": [
@@ -50,8 +50,7 @@
{ {
"allowedNames": ["this_"] "allowedNames": ["this_"]
} }
], ]
"no-undef": "off"
} }
} }
], ],

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"eslint.validate": ["javascript", "svelte"]
}

5
svelte.config.js Normal file
View File

@@ -0,0 +1,5 @@
// svelte-vscode seems to require a config for proper linting support
const sveltePreprocess = require("./ext/node_modules/svelte-preprocess");
module.exports = {
preprocess: sveltePreprocess()
};