@@ -10,15 +10,14 @@ import spaceUnaryOpsWithException from './eslint/space-unary-ops-with-exception.
1010
1111const rules = {
1212 'no-unused-vars' : [ 'error' , {
13- 'vars' : 'all' ,
14- 'args' : 'after-used' ,
15- 'caughtErrors' : 'all' ,
16- 'ignoreRestSiblings' : false ,
17- 'ignoreUsingDeclarations' : false ,
18- 'reportUsedIgnorePattern' : false ,
19- 'argsIgnorePattern' : '^_' ,
20- 'caughtErrorsIgnorePattern' : '^_' ,
21- 'destructuredArrayIgnorePattern' : '^_' ,
13+ vars : 'all' ,
14+ args : 'after-used' ,
15+ caughtErrors : 'none' ,
16+ ignoreRestSiblings : false ,
17+ ignoreUsingDeclarations : false ,
18+ reportUsedIgnorePattern : false ,
19+ argsIgnorePattern : '^_' ,
20+ destructuredArrayIgnorePattern : '^_' ,
2221
2322 } ] ,
2423 curly : [ 'error' , 'multi-line' ] ,
@@ -60,7 +59,7 @@ export default defineConfig([
6059 // TypeScript support block
6160 {
6261 files : [ '**/*.ts' ] ,
63- ignores : [ 'tests/**/*.ts' , 'extensions' ] ,
62+ ignores : [ 'tests/**/*.ts' , 'extensions/**/*.ts ' ] ,
6463 languageOptions : {
6564 parser : tseslintParser ,
6665 parserOptions : {
@@ -75,7 +74,7 @@ export default defineConfig([
7574 rules : {
7675 // Recommended rules for TypeScript
7776 '@typescript-eslint/no-explicit-any' : 'warn' ,
78- '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
77+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , caughtErrors : 'none' } ] ,
7978 '@typescript-eslint/ban-ts-comment' : 'warn' ,
8079 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
8180 } ,
@@ -88,7 +87,7 @@ export default defineConfig([
8887 parserOptions : {
8988 ecmaVersion : 'latest' ,
9089 sourceType : 'module' ,
91- project : 'extensions/tsconfig.json' ,
90+ project : './ extensions/tsconfig.json' ,
9291 } ,
9392 } ,
9493 plugins : {
@@ -97,16 +96,18 @@ export default defineConfig([
9796 rules : {
9897 // Recommended rules for TypeScript
9998 '@typescript-eslint/no-explicit-any' : 'warn' ,
100- '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
99+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , caughtErrors : 'none' } ] ,
101100 '@typescript-eslint/ban-ts-comment' : 'warn' ,
102101 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
103- } ,
104- } ,
102+ } } ,
105103 // TypeScript support for tests
106104 {
107105 files : [ 'tests/**/*.ts' ] ,
106+ ignores : [ 'tests/playwright/tests/**/*.ts' ] ,
107+
108108 languageOptions : {
109109 parser : tseslintParser ,
110+ globals : { ...globals . jest , ...globals . node } ,
110111 parserOptions : {
111112 ecmaVersion : 'latest' ,
112113 sourceType : 'module' ,
@@ -119,11 +120,10 @@ export default defineConfig([
119120 rules : {
120121 // Recommended rules for TypeScript
121122 '@typescript-eslint/no-explicit-any' : 'warn' ,
122- '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
123+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , caughtErrors : 'none' } ] ,
123124 '@typescript-eslint/ban-ts-comment' : 'warn' ,
124125 '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
125- } ,
126- } ,
126+ } } ,
127127 {
128128 plugins : {
129129 js,
@@ -136,7 +136,14 @@ export default defineConfig([
136136 } ,
137137 } ,
138138 {
139- files : [ 'src/backend/**/*.{js,mjs,cjs,ts}' ] ,
139+ files : [
140+ 'src/backend/**/*.{js,mjs,cjs,ts}' ,
141+ 'src/backend-core-0/**/*.{js,mjs,cjs,ts}' ,
142+ 'src/putility/**/*.{js,mjs,cjs,ts}' ,
143+ ] ,
144+ ignores : [
145+ '**/*.test.js' ,
146+ ] ,
140147 languageOptions : { globals : globals . node } ,
141148 rules,
142149 extends : [ 'js/recommended' ] ,
@@ -145,6 +152,17 @@ export default defineConfig([
145152 '@stylistic' : stylistic ,
146153 } ,
147154 } ,
155+ {
156+ files : [
157+ '**/*.test.js' ,
158+ ] ,
159+ languageOptions : { globals : { ...globals . jest , ...globals . node } } ,
160+ rules,
161+ plugins : {
162+ js,
163+ '@stylistic' : stylistic ,
164+ } ,
165+ } ,
148166 {
149167 files : [ 'extensions/**/*.{js,mjs,cjs,ts}' ] ,
150168 languageOptions : {
@@ -163,36 +181,36 @@ export default defineConfig([
163181 } ,
164182 } ,
165183 {
166- files : [ '**/*.{js,mjs,cjs,ts}' ] ,
184+ files : [ '**/*.{js,mjs,cjs,ts}' , 'src/gui/src/**/*.js' ] ,
167185 ignores : [
168186 'src/backend/**/*.{js,mjs,cjs,ts}' ,
169187 'extensions/**/*.{js,mjs,cjs,ts}' ,
188+ 'src/backend-core-0/**/*.{js,mjs,cjs,ts}' ,
189+ 'submodules/**' ,
190+ 'tests/**' ,
191+ 'tools/**' ,
192+ '**/*.min.js' ,
193+ '**/*.min.cjs' ,
194+ '**/*.min.mjs' ,
195+ '**/socket.io.js' ,
196+ '**/dist/*.js' ,
197+ 'src/phoenix/test/**' ,
198+ 'src/gui/src/lib/**' ,
199+ 'src/gui/dist/**' ,
170200 ] ,
171201 languageOptions : {
172202 globals : {
173203 ...globals . browser ,
174204 ...globals . jquery ,
175205 i18n : 'readonly' ,
176- } ,
177- } ,
178- rules,
179- } ,
180- {
181- files : [ '**/*.{js,mjs,cjs,ts}' ] ,
182- ignores : [ 'src/backend/**/*.{js,mjs,cjs,ts}' ] ,
183- languageOptions : {
184- globals : {
185- ...globals . browser ,
186- ...globals . jquery ,
187- i18n : 'readonly' ,
206+ puter : 'readonly' ,
188207 } ,
189208 } ,
190209 rules,
191210 extends : [ 'js/recommended' ] ,
192211 plugins : {
193212 js,
194213 '@stylistic' : stylistic ,
195-
196214 } ,
197215 } ,
198216] ) ;
0 commit comments