@@ -89,42 +89,6 @@ export async function imports(
89
89
"import/no-duplicates" : [ "error" , { "prefer-inline" : true } ] ,
90
90
// "import/no-dynamic-require": "off",
91
91
"import/no-empty-named-blocks" : "error" ,
92
- "import/no-extraneous-dependencies" : [
93
- "error" ,
94
- {
95
- bundledDependencies : true ,
96
- devDependencies : [
97
- `?(.)*.${ GLOB_SRC_EXT } ` ,
98
- `?(.)config?(s)/**` ,
99
- "**/?(.)script?(s)/**" ,
100
- "**/spec/**" ,
101
- "**/test?(s)/**" ,
102
- "**/__mocks__/**" ,
103
- "**/__tests__/**" ,
104
- `**/*{.,_}{test,spec}.${ GLOB_SRC_EXT } ` ,
105
- `**/Gruntfile{,.${ GLOB_SRC_EXT } ` ,
106
- `**/gulpfile.${ GLOB_SRC_EXT } ` ,
107
- `**/gulpfile.*.${ GLOB_SRC_EXT } ` ,
108
- `**/jest.config.${ GLOB_SRC_EXT } ` ,
109
- `**/jest.setup.${ GLOB_SRC_EXT } ` ,
110
- `**/karma.conf.${ GLOB_SRC_EXT } ` ,
111
- `**/postcss.config.${ GLOB_SRC_EXT } ` ,
112
- `**/protractor.conf.${ GLOB_SRC_EXT } ` ,
113
- `**/protractor.conf.*.${ GLOB_SRC_EXT } ` ,
114
- `**/rollup.config.${ GLOB_SRC_EXT } ` ,
115
- `**/rollup.config.*.${ GLOB_SRC_EXT } ` ,
116
- `**/tailwind.config.${ GLOB_SRC_EXT } ` ,
117
- `**/tailwind.config.*.${ GLOB_SRC_EXT } ` ,
118
- `**/vite.config.${ GLOB_SRC_EXT } ` ,
119
- `**/vitest.config.${ GLOB_SRC_EXT } ` ,
120
- `**/vue.config.${ GLOB_SRC_EXT } ` ,
121
- `**/webpack.config.${ GLOB_SRC_EXT } ` ,
122
- `**/webpack.config.*.${ GLOB_SRC_EXT } ` ,
123
- ] ,
124
- optionalDependencies : true ,
125
- peerDependencies : true ,
126
- } ,
127
- ] ,
128
92
// "import/no-internal-modules": "off",
129
93
"import/no-mutable-exports" : "error" ,
130
94
// "import/no-named-as-default": "off",
@@ -209,9 +173,60 @@ export async function imports(
209
173
} ,
210
174
] ,
211
175
"import/no-useless-path-segments" : [ "error" , { noUselessIndex : false } ] ,
176
+
177
+ "import/no-extraneous-dependencies" : [
178
+ "error" ,
179
+ {
180
+ bundledDependencies : true ,
181
+ devDependencies : [
182
+ `?(.)*.${ GLOB_SRC_EXT } ` ,
183
+ `?(.)config?(s)/**` ,
184
+ "**/?(.)script?(s)/**" ,
185
+ "**/spec/**" ,
186
+ "**/test?(s)/**" ,
187
+ "**/__mocks__/**" ,
188
+ "**/__tests__/**" ,
189
+ `**/*{.,_}{test,spec}.${ GLOB_SRC_EXT } ` ,
190
+ `**/Gruntfile{,.${ GLOB_SRC_EXT } ` ,
191
+ `**/gulpfile.${ GLOB_SRC_EXT } ` ,
192
+ `**/gulpfile.*.${ GLOB_SRC_EXT } ` ,
193
+ `**/jest.config.${ GLOB_SRC_EXT } ` ,
194
+ `**/jest.setup.${ GLOB_SRC_EXT } ` ,
195
+ `**/karma.conf.${ GLOB_SRC_EXT } ` ,
196
+ `**/postcss.config.${ GLOB_SRC_EXT } ` ,
197
+ `**/protractor.conf.${ GLOB_SRC_EXT } ` ,
198
+ `**/protractor.conf.*.${ GLOB_SRC_EXT } ` ,
199
+ `**/rollup.config.${ GLOB_SRC_EXT } ` ,
200
+ `**/rollup.config.*.${ GLOB_SRC_EXT } ` ,
201
+ `**/tailwind.config.${ GLOB_SRC_EXT } ` ,
202
+ `**/tailwind.config.*.${ GLOB_SRC_EXT } ` ,
203
+ `**/vite.config.${ GLOB_SRC_EXT } ` ,
204
+ `**/vitest.config.${ GLOB_SRC_EXT } ` ,
205
+ `**/vue.config.${ GLOB_SRC_EXT } ` ,
206
+ `**/webpack.config.${ GLOB_SRC_EXT } ` ,
207
+ `**/webpack.config.*.${ GLOB_SRC_EXT } ` ,
208
+ ] ,
209
+ optionalDependencies : true ,
210
+ peerDependencies : true ,
211
+ } ,
212
+ ] ,
212
213
} ,
213
214
} ,
214
215
]
215
- : [ ] ) satisfies FlatConfigItem [ ] ) ,
216
+ : options . mode === "application"
217
+ ? [
218
+ {
219
+ files : [ GLOB_SRC ] ,
220
+ rules : {
221
+ "import/no-unassigned-import" : [
222
+ "error" ,
223
+ {
224
+ allow : [ "**/*.?(s)css" ] ,
225
+ } ,
226
+ ] ,
227
+ } ,
228
+ } ,
229
+ ]
230
+ : [ ] ) satisfies FlatConfigItem [ ] ) ,
216
231
] ;
217
232
}
0 commit comments