@@ -7,6 +7,8 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
77import eslintPluginUnicorn from 'eslint-plugin-unicorn'
88import eslintMarkdown from '@eslint/markdown'
99import eslintPluginMarkdownPreferences from 'eslint-plugin-markdown-preferences'
10+ import eslintPluginTs from '@typescript-eslint/eslint-plugin'
11+ import tsEslintParser from '@typescript-eslint/parser'
1012import vueEslintParser from 'vue-eslint-parser'
1113import noInvalidMeta from './eslint-internal-rules/no-invalid-meta.js'
1214import noInvalidMetaDocsCategories from './eslint-internal-rules/no-invalid-meta-docs-categories.js'
@@ -50,6 +52,7 @@ export default typegen([
5052 {
5153 ignores : [
5254 '.nyc_output' ,
55+ 'eslint-typegen.d.ts' ,
5356 'coverage' ,
5457 'node_modules' ,
5558 '.changeset/**/*.md' ,
@@ -78,7 +81,7 @@ export default typegen([
7881 }
7982 } ,
8083 ...defineConfig ( {
81- files : [ '**/*.js ' ] ,
84+ files : [ '**/*.{js,mjs,ts,mts} ' ] ,
8285 extends : [
8386 eslintPluginEslintPlugin ,
8487 eslintPluginUnicorn . configs [ 'flat/recommended' ]
@@ -105,7 +108,21 @@ export default typegen([
105108 } ) ,
106109
107110 {
108- files : [ '**/*.js' ] ,
111+ name : 'typescript/setup' ,
112+ files : [ '**/*.{ts,mts}' ] ,
113+ languageOptions : {
114+ parser : tsEslintParser ,
115+ parserOptions : {
116+ sourceType : 'module'
117+ }
118+ } ,
119+ plugins : {
120+ '@typescript-eslint' : eslintPluginTs
121+ }
122+ } ,
123+
124+ {
125+ files : [ '**/*.{js,mjs,ts,mts}' ] ,
109126 languageOptions : {
110127 ecmaVersion : 'latest' ,
111128 sourceType : 'commonjs' ,
@@ -249,6 +266,35 @@ export default typegen([
249266 'internal/require-eslint-community' : [ 'error' ]
250267 }
251268 } ,
269+
270+ {
271+ files : [ '**/*.{mjs,ts,mts}' ] ,
272+ languageOptions : {
273+ sourceType : 'module'
274+ }
275+ } ,
276+
277+ {
278+ files : [ '**/*.{ts,mts}' ] ,
279+ rules : {
280+ ...eslintPluginTs . configs . strict . rules ,
281+ ...eslintPluginTs . configs [ 'flat/eslint-recommended' ] . rules ,
282+ 'no-redeclare' : 'off' ,
283+ '@typescript-eslint/no-redeclare' : 'error' ,
284+ '@typescript-eslint/no-explicit-any' : 'off' ,
285+ '@typescript-eslint/no-empty-object-type' : 'off' ,
286+ '@typescript-eslint/no-namespace' : 'off' ,
287+ '@typescript-eslint/triple-slash-reference' : 'off' ,
288+ '@typescript-eslint/unified-signatures' : 'off' ,
289+ '@typescript-eslint/ban-ts-comment' : [
290+ 'error' ,
291+ {
292+ minimumDescriptionLength : 3
293+ }
294+ ]
295+ }
296+ } ,
297+
252298 {
253299 files : [ './**/*.vue' ] ,
254300 languageOptions : {
0 commit comments