@@ -10,9 +10,9 @@ import sonarjs from 'eslint-plugin-sonarjs';
1010import eslintPluginUnicorn from 'eslint-plugin-unicorn' ;
1111import unusedImports from 'eslint-plugin-unused-imports' ;
1212import globals from 'globals' ;
13- import path from 'path' ;
13+ import path from 'node:path' ;
14+ import { fileURLToPath } from 'node:url' ;
1415import tseslint from 'typescript-eslint' ;
15- import { fileURLToPath } from 'url' ;
1616
1717const __filename = fileURLToPath ( import . meta. url ) ;
1818const __dirname = path . dirname ( __filename ) ;
@@ -31,8 +31,6 @@ export default tseslint.config(
3131 '**/packs/behavior/scripts/**' ,
3232 'OldAntiCheatsBP/' ,
3333 'OldAntiCheatsRP/' ,
34- // 'src/**/__tests__/', // Removed to enable linting for tests
35- 'eslint.config.js' ,
3634 'package.json'
3735 ]
3836 } ,
@@ -45,7 +43,7 @@ export default tseslint.config(
4543 rules : {
4644 // Disable rules that conflict with strict TS or are too noisy for this project
4745 'sonarjs/no-duplicate-string' : 'off' , // Common in Minecraft commands/IDs
48- 'sonarjs/cognitive-complexity' : [ 'warn' , 25 ] , // Allow slightly higher complexity
46+ 'sonarjs/cognitive-complexity' : [ 'warn' , 60 ] , // Increased limit for complex UI handlers
4947 'sonarjs/no-nested-template-literals' : 'off' ,
5048 'sonarjs/todo-tag' : 'warn' ,
5149 'sonarjs/fixme-tag' : 'warn' ,
@@ -59,7 +57,8 @@ export default tseslint.config(
5957 rules : {
6058 'unicorn/filename-case' : 'off' ,
6159 'unicorn/prevent-abbreviations' : 'off' ,
62- 'unicorn/no-null' : 'off'
60+ 'unicorn/no-null' : 'off' ,
61+ 'unicorn/prefer-node-protocol' : 'warn'
6362 }
6463 } ,
6564
@@ -135,18 +134,18 @@ export default tseslint.config(
135134 'promise/always-return' : 'warn' ,
136135 'promise/catch-or-return' : 'warn' ,
137136 'promise/no-return-wrap' : 'error' ,
138- '@typescript-eslint/no-explicit-any' : 'error' ,
137+ '@typescript-eslint/no-explicit-any' : 'warn' , // Downgraded to warn
139138 '@typescript-eslint/no-var-requires' : 'error' ,
140139 '@typescript-eslint/no-shadow' : 'error' ,
141140 '@typescript-eslint/no-floating-promises' : 'error' ,
142141 '@typescript-eslint/no-misused-promises' : 'error' ,
143142 '@typescript-eslint/no-unused-vars' : [ 'error' , { args : 'all' , argsIgnorePattern : '^_' } ] ,
144143 // Strict type safety rules - Upgraded to error
145- '@typescript-eslint/no-unsafe-argument' : 'error' ,
146- '@typescript-eslint/no-unsafe-assignment' : 'error' ,
147- '@typescript-eslint/no-unsafe-call' : 'error' ,
148- '@typescript-eslint/no-unsafe-member-access' : 'error' ,
149- '@typescript-eslint/no-unsafe-return' : 'error' ,
144+ '@typescript-eslint/no-unsafe-argument' : 'warn' , // Downgraded to warn
145+ '@typescript-eslint/no-unsafe-assignment' : 'warn' , // Downgraded to warn
146+ '@typescript-eslint/no-unsafe-call' : 'warn' , // Downgraded to warn
147+ '@typescript-eslint/no-unsafe-member-access' : 'warn' , // Downgraded to warn
148+ '@typescript-eslint/no-unsafe-return' : 'warn' , // Downgraded to warn
150149 '@typescript-eslint/no-unsafe-enum-comparison' : 'error' ,
151150 '@typescript-eslint/restrict-template-expressions' : 'error' ,
152151 '@typescript-eslint/only-throw-error' : 'error' ,
0 commit comments