@@ -24,6 +24,7 @@ import jestExtendedPlugin from 'eslint-plugin-jest-extended';
24
24
import noticePlugin from 'eslint-plugin-notice' ;
25
25
import playwright from 'eslint-plugin-playwright' ;
26
26
import prettierRecommendedConfig from 'eslint-plugin-prettier/recommended' ;
27
+ // eslint-disable-next-line import/namespace,import/default
27
28
import unicornPlugin from 'eslint-plugin-unicorn' ;
28
29
// eslint-disable-next-line import/no-unresolved
29
30
import tseslint from 'typescript-eslint' ;
@@ -65,8 +66,10 @@ export default tseslint.config(
65
66
} ,
66
67
} ,
67
68
68
- unicornPlugin . configs [ 'flat/recommended' ] , // https://github.com/sindresorhus/eslint-plugin-unicorn?tab=readme-ov-file#es-module-recommended-1
69
+ // Unicorn
69
70
{
71
+ extends : [ unicornPlugin . configs [ 'flat/recommended' ] ] , // https://github.com/sindresorhus/eslint-plugin-unicorn?tab=readme-ov-file#es-module-recommended-1
72
+
70
73
rules : {
71
74
'unicorn/filename-case' : [
72
75
'error' ,
@@ -96,6 +99,7 @@ export default tseslint.config(
96
99
} ,
97
100
} ,
98
101
102
+ // Import
99
103
{
100
104
extends : [
101
105
// Feature of `typescript-eslint` to extend multiple configs: https://typescript-eslint.io/packages/typescript-eslint/#flat-config-extends
@@ -119,13 +123,14 @@ export default tseslint.config(
119
123
} ,
120
124
} ,
121
125
126
+ // TypeScript
127
+
122
128
// disable type-aware linting on JS files
123
129
{
124
130
files : [ '**/*.js' , '**/*.cjs' , '**/*.mjs' ] ,
125
- ... tseslint . configs . disableTypeChecked ,
131
+ extends : [ tseslint . configs . disableTypeChecked ] ,
126
132
} ,
127
133
128
- // typescript
129
134
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile } */
130
135
{
131
136
files : [ '**/*.ts' , '**/*.cts' , '**/*.mts' ] ,
@@ -134,8 +139,8 @@ export default tseslint.config(
134
139
eslint . configs . recommended , // Problem with 'module', 'require', 'console', 'exports', etc. on .js, .cjs, .mjs files
135
140
...tseslint . configs . recommended ,
136
141
...tseslint . configs . stylistic ,
142
+ importPlugin . flatConfigs . typescript ,
137
143
] ,
138
- ...importPlugin . flatConfigs . typescript ,
139
144
settings : {
140
145
'import/resolver' : {
141
146
typescript : {
0 commit comments