11import { defineConfig , globalIgnores } from 'eslint/config'
22import typescriptEslint from '@typescript-eslint/eslint-plugin'
33import tsParser from '@typescript-eslint/parser'
4+ import svelteEslintParser from 'svelte-eslint-parser'
5+ import eslintConfigPrettier from 'eslint-config-prettier/flat'
46
57export default defineConfig ( [
68 globalIgnores ( [ '**/out' , '**/dist' , '**/*.d.ts' ] ) ,
79 {
10+ rules : {
11+ '@/semi' : [ 'warn' , 'never' ] ,
12+ curly : 'warn' ,
13+ 'no-unused-vars' : [
14+ 'warn' ,
15+ {
16+ vars : 'all' ,
17+ argsIgnorePattern : '^_' ,
18+ varsIgnorePattern : '^_' ,
19+ caughtErrorsIgnorePattern : '^_' ,
20+ } ,
21+ ] ,
22+ eqeqeq : 'warn' ,
23+ 'no-throw-literal' : 'warn' ,
24+ semi : [ 'warn' , 'never' ] ,
25+ quotes : [ 'warn' , 'single' ] ,
26+ } ,
27+ } ,
28+ {
29+ files : [ '**/*.{js,jsx,mjs,cjs,ts,tsx,json}' ] ,
830 plugins : {
931 '@typescript-eslint' : typescriptEslint ,
1032 } ,
@@ -23,13 +45,16 @@ export default defineConfig([
2345 format : [ 'camelCase' , 'PascalCase' ] ,
2446 } ,
2547 ] ,
26-
27- '@/semi' : [ 'warn' , 'never' ] ,
28- curly : 'warn' ,
29- eqeqeq : 'warn' ,
30- 'no-throw-literal' : 'warn' ,
31- semi : [ 'warn' , 'never' ] ,
32- quotes : [ 'warn' , 'single' ] ,
3348 } ,
3449 } ,
50+ {
51+ files : [ '**/*.svelte' ] ,
52+ languageOptions : {
53+ parser : svelteEslintParser ,
54+ parserOptions : {
55+ parser : tsParser ,
56+ } ,
57+ } ,
58+ } ,
59+ eslintConfigPrettier ,
3560] )
0 commit comments