@@ -6,7 +6,7 @@ module.exports = {
66 'plugin:@typescript-eslint/recommended' ,
77 'prettier' ,
88 ] ,
9- plugins : [ 'svelte3' , '@typescript-eslint' , 'vitest' ] ,
9+ plugins : [ 'svelte3' , '@typescript-eslint' , 'vitest' , 'import' ] ,
1010 ignorePatterns : [ '*.cjs' , 'prism.cjs' , '/server' ] ,
1111 overrides : [
1212 {
@@ -54,7 +54,7 @@ module.exports = {
5454 } ,
5555 rules : {
5656 '@typescript-eslint/no-unused-vars' : [
57- 1 ,
57+ 'error' ,
5858 {
5959 argsIgnorePattern : '^_' ,
6060 varsIgnorePattern : '^_' ,
@@ -79,5 +79,43 @@ module.exports = {
7979 ] ,
8080 } ,
8181 ] ,
82+ 'sort-imports' : [
83+ 'error' ,
84+ { ignoreCase : true , ignoreDeclarationSort : true } ,
85+ ] ,
86+ 'import/order' : [
87+ 'error' ,
88+ {
89+ groups : [
90+ 'builtin' ,
91+ 'external' ,
92+ 'internal' ,
93+ [ 'parent' , 'sibling' , 'index' ] ,
94+ ] ,
95+ pathGroups : [
96+ {
97+ pattern : 'svelte/**' ,
98+ group : 'external' ,
99+ position : 'before' ,
100+ } ,
101+ { pattern : '$app/**' , group : 'external' , position : 'after' } ,
102+ { pattern : './$types' , group : 'external' , position : 'after' } ,
103+ { pattern : '$lib/**' , group : 'internal' } ,
104+ {
105+ pattern : '$components/**/*.svelte' ,
106+ group : 'internal' ,
107+ position : 'after' ,
108+ } ,
109+ { pattern : './**/*.svelte' , group : 'index' , position : 'after' } ,
110+ ] ,
111+ pathGroupsExcludedImportTypes : [ 'svelte' ] ,
112+ 'newlines-between' : 'always' ,
113+ alphabetize : {
114+ order : 'asc' ,
115+ caseInsensitive : false ,
116+ orderImportKind : 'asc' ,
117+ } ,
118+ } ,
119+ ] ,
82120 } ,
83121} ;
0 commit comments