11import process from 'node:process'
22import 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'
44import { parserTs , pluginAntfu , pluginImport , pluginTs } from '../plugins'
55import { OFF } from '../flags'
66import type { OptionsComponentExts , OptionsOverrides , OptionsTypeScriptParserOptions , OptionsTypeScriptWithTypes } from '../types'
@@ -49,8 +49,7 @@ export function typescript(
4949 } ,
5050 {
5151 files : [
52- GLOB_TS ,
53- GLOB_TSX ,
52+ GLOB_SRC ,
5453 ...componentExts . map ( ext => `**/*.${ ext } ` ) ,
5554 ] ,
5655 languageOptions : {
@@ -100,6 +99,7 @@ export function typescript(
10099 'ts/no-dynamic-delete' : OFF ,
101100 'ts/no-explicit-any' : OFF ,
102101 'ts/no-extra-parens' : [ 'error' , 'functions' ] ,
102+ 'ts/no-extraneous-class' : OFF ,
103103 'ts/no-invalid-this' : 'error' ,
104104 'ts/no-invalid-void-type' : OFF ,
105105 'ts/no-loss-of-precision' : 'error' ,
@@ -108,8 +108,10 @@ export function typescript(
108108 'ts/no-require-imports' : 'error' ,
109109 'ts/no-unused-vars' : OFF ,
110110 'ts/no-use-before-define' : [ 'error' , { classes : false , functions : false , variables : true } ] ,
111+ 'ts/no-useless-constructor' : OFF ,
111112 'ts/prefer-ts-expect-error' : 'error' ,
112113 'ts/triple-slash-reference' : OFF ,
114+ 'ts/unified-signatures' : OFF ,
113115
114116 ...tsconfigPath ? typeAwareRules : { } ,
115117 ...overrides ,
@@ -130,7 +132,7 @@ export function typescript(
130132 } ,
131133 } ,
132134 {
133- files : [ GLOB_JSX ] ,
135+ files : [ GLOB_JS ] ,
134136 rules : {
135137 'ts/no-require-imports' : OFF ,
136138 'ts/no-var-requires' : OFF ,
0 commit comments