@@ -4,41 +4,6 @@ import { defineConfig } from 'eslint/config';
44import stylistic from '@stylistic/eslint-plugin' ;
55import tsparser from '@typescript-eslint/parser' ;
66import tseslint from '@typescript-eslint/eslint-plugin' ;
7- import importPlugin from 'eslint-plugin-import' ;
8-
9- const IMPORT_ORDER_RULES = {
10- 'import/order' : [ 'error' , {
11- groups : [
12- 'builtin' ,
13- 'external' ,
14- 'internal' ,
15- 'parent' ,
16- 'sibling' ,
17- 'index' ,
18- ] ,
19- 'newlines-between' : 'never' ,
20- alphabetize : {
21- order : 'asc' ,
22- caseInsensitive : false ,
23- } ,
24- } ] ,
25- 'import/newline-after-import' : [ 'error' , { count : 1 } ] ,
26- 'sort-imports' : [ 'error' , {
27- ignoreDeclarationSort : true ,
28- ignoreCase : false ,
29- memberSyntaxSortOrder : [ 'none' , 'all' , 'multiple' , 'single' ] ,
30- } ] ,
31- } ;
32-
33- const IMPORT_SETTINGS = {
34- 'import/resolver' : {
35- typescript : {
36- alwaysTryTypes : true ,
37- project : './tsconfig.json' ,
38- } ,
39- node : true ,
40- } ,
41- } ;
427
438export default defineConfig (
449 eslint . configs . recommended ,
@@ -69,11 +34,8 @@ export default defineConfig(
6934 } ,
7035 plugins : {
7136 '@stylistic' : stylistic ,
72- import : importPlugin ,
7337 } ,
74- settings : IMPORT_SETTINGS ,
7538 rules : {
76- ...IMPORT_ORDER_RULES ,
7739 'no-unused-vars' : [
7840 'warn' ,
7941 {
@@ -92,9 +54,7 @@ export default defineConfig(
9254 files : [ '**/__tests__/**/*.js' , '**/*.test.js' , '**/*.spec.js' , '**/__tests__/**/*.ts' , '**/*.test.ts' , '**/*.spec.ts' ] ,
9355 plugins : {
9456 '@typescript-eslint' : tseslint ,
95- import : importPlugin ,
9657 } ,
97- settings : IMPORT_SETTINGS ,
9858 languageOptions : {
9959 globals : {
10060 ...globals . node ,
@@ -119,7 +79,6 @@ export default defineConfig(
11979 } ,
12080 } ,
12181 rules : {
122- ...IMPORT_ORDER_RULES ,
12382 '@stylistic/object-curly-newline' : [ 'error' , {
12483 ObjectExpression : { multiline : true , minProperties : 1 } ,
12584 ObjectPattern : { multiline : true , minProperties : 1 } ,
0 commit comments