Skip to content

Commit 7d71b6d

Browse files
committed
Update eslint-plugin-svelte
1 parent 4e6bb15 commit 7d71b6d

File tree

3 files changed

+452
-460
lines changed

3 files changed

+452
-460
lines changed

eslint.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ import svelte from 'eslint-plugin-svelte';
55
import globals from 'globals';
66
import { fileURLToPath } from 'node:url';
77
import ts from 'typescript-eslint';
8+
import svelteConfig from './svelte.config.js';
89
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
910

1011
export default ts.config(
1112
includeIgnoreFile(gitignorePath),
1213
js.configs.recommended,
1314
...ts.configs.recommended,
14-
...svelte.configs['flat/recommended'],
15+
...svelte.configs.recommended,
1516
prettier,
16-
...svelte.configs['flat/prettier'],
17+
...svelte.configs.prettier,
1718
{
1819
languageOptions: {
1920
globals: {
@@ -23,11 +24,15 @@ export default ts.config(
2324
}
2425
},
2526
{
26-
files: ['**/*.svelte'],
27+
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
28+
ignores: ['eslint.config.js', 'svelte.config.js'],
2729

2830
languageOptions: {
2931
parserOptions: {
30-
parser: ts.parser
32+
projectService: true,
33+
extraFileExtensions: ['.svelte'],
34+
parser: ts.parser,
35+
svelteConfig
3136
}
3237
}
3338
}

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"dev": "vite dev",
88
"build": "vite build",
99
"preview": "vite preview",
10+
"prepare": "svelte-kit sync || echo ''",
1011
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1112
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1213
"format": "prettier --write .",
@@ -20,14 +21,19 @@
2021
"@sveltejs/vite-plugin-svelte": "^5.0.0",
2122
"eslint": "^9.18.0",
2223
"eslint-config-prettier": "^10.0.1",
23-
"eslint-plugin-svelte": "^2.46.1",
24-
"globals": "^15.14.0",
24+
"eslint-plugin-svelte": "^3.0.0",
25+
"globals": "^16.0.0",
2526
"prettier": "^3.4.2",
2627
"prettier-plugin-svelte": "^3.3.3",
2728
"svelte": "^5.0.0",
2829
"svelte-check": "^4.0.0",
2930
"typescript": "^5.0.0",
3031
"typescript-eslint": "^8.20.0",
3132
"vite": "^6.0.0"
33+
},
34+
"pnpm": {
35+
"onlyBuiltDependencies": [
36+
"esbuild"
37+
]
3238
}
3339
}

0 commit comments

Comments
 (0)