1
1
import process from 'node:process'
2
2
import type { FlatESLintConfigItem } from 'eslint-define-config'
3
- import { GLOB_JSX , GLOB_TESTS , GLOB_TS , GLOB_TSX } from '../globs'
3
+ import { GLOB_JS , GLOB_SRC , GLOB_TESTS , GLOB_TS , GLOB_TSX } from '../globs'
4
4
import { parserTs , pluginAntfu , pluginImport , pluginTs } from '../plugins'
5
5
import { OFF } from '../flags'
6
6
import type { OptionsComponentExts , OptionsOverrides , OptionsTypeScriptParserOptions , OptionsTypeScriptWithTypes } from '../types'
@@ -49,8 +49,7 @@ export function typescript(
49
49
} ,
50
50
{
51
51
files : [
52
- GLOB_TS ,
53
- GLOB_TSX ,
52
+ GLOB_SRC ,
54
53
...componentExts . map ( ext => `**/*.${ ext } ` ) ,
55
54
] ,
56
55
languageOptions : {
@@ -100,6 +99,7 @@ export function typescript(
100
99
'ts/no-dynamic-delete' : OFF ,
101
100
'ts/no-explicit-any' : OFF ,
102
101
'ts/no-extra-parens' : [ 'error' , 'functions' ] ,
102
+ 'ts/no-extraneous-class' : OFF ,
103
103
'ts/no-invalid-this' : 'error' ,
104
104
'ts/no-invalid-void-type' : OFF ,
105
105
'ts/no-loss-of-precision' : 'error' ,
@@ -108,8 +108,10 @@ export function typescript(
108
108
'ts/no-require-imports' : 'error' ,
109
109
'ts/no-unused-vars' : OFF ,
110
110
'ts/no-use-before-define' : [ 'error' , { classes : false , functions : false , variables : true } ] ,
111
+ 'ts/no-useless-constructor' : OFF ,
111
112
'ts/prefer-ts-expect-error' : 'error' ,
112
113
'ts/triple-slash-reference' : OFF ,
114
+ 'ts/unified-signatures' : OFF ,
113
115
114
116
...tsconfigPath ? typeAwareRules : { } ,
115
117
...overrides ,
@@ -130,7 +132,7 @@ export function typescript(
130
132
} ,
131
133
} ,
132
134
{
133
- files : [ GLOB_JSX ] ,
135
+ files : [ GLOB_JS ] ,
134
136
rules : {
135
137
'ts/no-require-imports' : OFF ,
136
138
'ts/no-var-requires' : OFF ,
0 commit comments