@@ -6,10 +6,11 @@ import globals from 'globals';
66import { fileURLToPath } from 'node:url' ;
77import ts from 'typescript-eslint' ;
88import svelteConfig from './svelte.config.js' ;
9+ import { defineConfig } from '@eslint/config-helpers' ;
910
1011const gitignorePath = fileURLToPath ( new URL ( './.gitignore' , import . meta. url ) ) ;
1112
12- export default ts . config (
13+ export default defineConfig ( [
1314 includeIgnoreFile ( gitignorePath ) ,
1415 js . configs . recommended ,
1516 ...ts . configs . recommended ,
@@ -27,14 +28,38 @@ export default ts.config(
2728 }
2829 } ,
2930 {
30- files : [ '**/*.svelte' , '**/*.svelte.ts' , '**/*.svelte.js' ] ,
31+ files : [ '**/*.svelte' , '**/*.svelte.ts' ] ,
3132 languageOptions : {
3233 parserOptions : {
33- projectService : true ,
34+ projectService : false ,
3435 extraFileExtensions : [ '.svelte' ] ,
3536 parser : ts . parser ,
3637 svelteConfig
3738 }
39+ } ,
40+ rules : {
41+ 'prefer-const' : 'off' ,
42+ 'svelte/prefer-const' : [
43+ 'error' ,
44+ {
45+ excludedRunes : [ '$props' , '$derived' , '$state' ]
46+ }
47+ ]
48+ }
49+ } ,
50+ {
51+ rules : {
52+ 'no-console' : [ 'error' , { allow : [ 'debug' , 'info' , 'warn' , 'error' , 'time' , 'timeEnd' ] } ] ,
53+ '@typescript-eslint/no-unused-vars' : [
54+ 'error' ,
55+ {
56+ argsIgnorePattern : '^_' ,
57+ caughtErrorsIgnorePattern : '^_' ,
58+ destructuredArrayIgnorePattern : '^_' ,
59+ varsIgnorePattern : '^_'
60+ }
61+ ] ,
62+ 'svelte/no-navigation-without-resolve' : 'off'
3863 }
3964 }
40- ) ;
65+ ] ) ;
0 commit comments