1
1
import process from 'node:process'
2
2
import { GLOB_ASTRO_TS , GLOB_DTS , GLOB_MARKDOWN , GLOB_TS , GLOB_TSX } from '../constants/glob'
3
3
import { pluginAntfu } from '../plugins'
4
- import { interopDefault , renameRules , toArray } from '../shared'
4
+ import { interopDefault , renameRules } from '../shared'
5
5
import type {
6
6
OptionsComponentExts ,
7
7
OptionsFiles ,
@@ -32,9 +32,7 @@ export async function typescript(
32
32
GLOB_ASTRO_TS ,
33
33
]
34
34
35
- const tsconfigPath = options ?. tsconfigPath
36
- ? toArray ( options . tsconfigPath )
37
- : undefined
35
+ const tsconfigPath = options . tsconfigPath
38
36
const isTypeAware = ! ! tsconfigPath
39
37
40
38
const typeAwareRules : TypedFlatConfigItem [ 'rules' ] = {
@@ -129,7 +127,7 @@ export async function typescript(
129
127
'no-useless-constructor' : 'off' ,
130
128
'ts/ban-ts-comment' : [
131
129
'error' ,
132
- { 'ts-ignore ' : 'allow-with-description' } ,
130
+ { 'ts-expect-error ' : 'allow-with-description' } ,
133
131
] ,
134
132
'ts/consistent-type-definitions' : [ 'error' , 'interface' ] ,
135
133
'ts/consistent-type-imports' : [
@@ -155,7 +153,6 @@ export async function typescript(
155
153
] ,
156
154
'ts/no-useless-constructor' : 'off' ,
157
155
'ts/no-wrapper-object-types' : 'error' ,
158
- 'ts/prefer-ts-expect-error' : 'error' ,
159
156
'ts/triple-slash-reference' : 'off' ,
160
157
'ts/unified-signatures' : 'off' ,
161
158
...overrides ,
0 commit comments