@@ -56,16 +56,17 @@ const rules = {
5656} ;
5757
5858export default defineConfig ( [
59- // TypeScript support block
59+ // TypeScript support for tests
6060 {
61- files : [ '**/*.ts' ] ,
62- ignores : [ 'tests/**/*.ts' , 'extensions /**/*.ts'] ,
61+ files : [ '**/*.test.ts' , '**/*.test.mts' , '**/*.test.setup. ts'] ,
62+ ignores : [ 'tests/playwright/tests /**/*.ts' ] ,
6363 languageOptions : {
6464 parser : tseslintParser ,
65+ globals : { ...globals . node , ...globals . vitest } ,
6566 parserOptions : {
6667 ecmaVersion : 'latest' ,
6768 sourceType : 'module' ,
68- project : './tsconfig.json' ,
69+ project : './tests/ tsconfig.json' ,
6970 } ,
7071 } ,
7172 plugins : {
@@ -79,15 +80,16 @@ export default defineConfig([
7980 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
8081 } ,
8182 } ,
82- // TypeScript support for extensions
83+ // TypeScript support block
8384 {
84- files : [ 'extensions/**/*.ts' ] ,
85+ files : [ '**/*.ts' ] ,
86+ ignores : [ '**/*.test.ts' , '**/*.test.mts' , 'extensions/**/*.ts' ] ,
8587 languageOptions : {
8688 parser : tseslintParser ,
8789 parserOptions : {
8890 ecmaVersion : 'latest' ,
8991 sourceType : 'module' ,
90- project : './extensions/ tsconfig.json' ,
92+ project : './tsconfig.json' ,
9193 } ,
9294 } ,
9395 plugins : {
@@ -99,19 +101,17 @@ export default defineConfig([
99101 '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , caughtErrors : 'none' } ] ,
100102 '@typescript-eslint/ban-ts-comment' : 'warn' ,
101103 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
102- } } ,
103- // TypeScript support for tests
104+ } ,
105+ } ,
106+ // TypeScript support for extensions
104107 {
105- files : [ 'tests/**/*.ts' ] ,
106- ignores : [ 'tests/playwright/tests/**/*.ts' ] ,
107-
108+ files : [ 'extensions/**/*.ts' ] ,
108109 languageOptions : {
109110 parser : tseslintParser ,
110- globals : { ...globals . jest , ...globals . node } ,
111111 parserOptions : {
112112 ecmaVersion : 'latest' ,
113113 sourceType : 'module' ,
114- project : './tests /tsconfig.json' ,
114+ project : './extensions /tsconfig.json' ,
115115 } ,
116116 } ,
117117 plugins : {
@@ -123,16 +123,19 @@ export default defineConfig([
123123 '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , caughtErrors : 'none' } ] ,
124124 '@typescript-eslint/ban-ts-comment' : 'warn' ,
125125 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
126- } } ,
126+ } ,
127+ } ,
127128 {
128129 plugins : {
129130 js,
130131 '@stylistic' : stylistic ,
131- custom : { rules : {
132- 'control-structure-spacing' : controlStructureSpacing ,
133- 'bang-space-if' : bangSpaceIf ,
134- 'space-unary-ops-with-exception' : spaceUnaryOpsWithException ,
135- } } ,
132+ custom : {
133+ rules : {
134+ 'control-structure-spacing' : controlStructureSpacing ,
135+ 'bang-space-if' : bangSpaceIf ,
136+ 'space-unary-ops-with-exception' : spaceUnaryOpsWithException ,
137+ } ,
138+ } ,
136139 } ,
137140 } ,
138141 {
@@ -143,6 +146,8 @@ export default defineConfig([
143146 ] ,
144147 ignores : [
145148 '**/*.test.js' ,
149+ '**/*.test.ts' ,
150+ '**/*.test.mts' ,
146151 ] ,
147152 languageOptions : { globals : globals . node } ,
148153 rules,
@@ -155,8 +160,10 @@ export default defineConfig([
155160 {
156161 files : [
157162 '**/*.test.js' ,
163+ '**/*.test.ts' ,
164+ '**/*.test.mts' ,
158165 ] ,
159- languageOptions : { globals : { ...globals . jest , ...globals . node } } ,
166+ languageOptions : { globals : { ...globals . node , ...globals . vitest } } ,
160167 rules,
161168 plugins : {
162169 js,
0 commit comments