@@ -4,6 +4,7 @@ import eslint from '@eslint/js';
44import { defineConfig } from 'eslint/config' ;
55import importPlugin from 'eslint-plugin-import' ;
66import react from 'eslint-plugin-react' ;
7+ import unusedImports from 'eslint-plugin-unused-imports' ;
78import globals from 'globals' ;
89import tseslint from 'typescript-eslint' ;
910
@@ -34,6 +35,7 @@ export default defineConfig(
3435 } ,
3536 plugins : {
3637 import : importPlugin ,
38+ 'unused-imports' : unusedImports ,
3739 } ,
3840 settings : {
3941 'import/resolver' : {
@@ -57,16 +59,7 @@ export default defineConfig(
5759 '@typescript-eslint/no-explicit-any' : 'warn' ,
5860 '@typescript-eslint/no-require-imports' : 'warn' ,
5961 '@typescript-eslint/ban-ts-comment' : 'warn' ,
60- '@typescript-eslint/no-unused-vars' : [
61- 'warn' ,
62- {
63- vars : 'all' ,
64- varsIgnorePattern : '^_' ,
65- args : 'after-used' ,
66- argsIgnorePattern : '^_' ,
67- caughtErrors : 'none' , // Allow unused error variables in catch blocks
68- } ,
69- ] ,
62+ '@typescript-eslint/no-unused-vars' : 'off' , // Handled by unused-imports plugin
7063 'lines-between-class-members' : [
7164 'warn' ,
7265 'always' ,
@@ -98,6 +91,17 @@ export default defineConfig(
9891 ] ,
9992 'import/newline-after-import' : 'warn' ,
10093 'import/no-duplicates' : 'warn' ,
94+ 'unused-imports/no-unused-imports' : 'warn' ,
95+ 'unused-imports/no-unused-vars' : [
96+ 'warn' ,
97+ {
98+ vars : 'all' ,
99+ varsIgnorePattern : '^_' ,
100+ args : 'after-used' ,
101+ argsIgnorePattern : '^_' ,
102+ caughtErrors : 'none' , // Allow unused error variables in catch blocks
103+ } ,
104+ ] ,
101105 } ,
102106 } ,
103107
0 commit comments