@@ -2,12 +2,14 @@ import js from '@eslint/js'
22import globals from 'globals'
33import reactHooks from 'eslint-plugin-react-hooks'
44import reactRefresh from 'eslint-plugin-react-refresh'
5+ import tsParser from '@typescript-eslint/parser'
6+ import tsPlugin from '@typescript-eslint/eslint-plugin'
57import { defineConfig , globalIgnores } from 'eslint/config'
68
79export default defineConfig ( [
810 globalIgnores ( [ 'dist' ] ) ,
911 {
10- files : [ '**/*.{js,jsx,ts,tsx }' ] ,
12+ files : [ '**/*.{js,jsx}' ] ,
1113 ignores : [ 'backend/**' , 'src/test/**' ] ,
1214 extends : [
1315 js . configs . recommended ,
@@ -28,6 +30,34 @@ export default defineConfig([
2830 'react-refresh/only-export-components' : 'warn' ,
2931 } ,
3032 } ,
33+ {
34+ files : [ '**/*.{ts,tsx}' ] ,
35+ ignores : [ 'backend/**' , 'src/test/**' ] ,
36+ extends : [
37+ js . configs . recommended ,
38+ reactHooks . configs . flat . recommended ,
39+ reactRefresh . configs . vite ,
40+ ] ,
41+ languageOptions : {
42+ ecmaVersion : 2020 ,
43+ globals : globals . browser ,
44+ parser : tsParser ,
45+ parserOptions : {
46+ ecmaVersion : 'latest' ,
47+ ecmaFeatures : { jsx : true } ,
48+ sourceType : 'module' ,
49+ } ,
50+ } ,
51+ plugins : {
52+ '@typescript-eslint' : tsPlugin ,
53+ } ,
54+ rules : {
55+ 'no-unused-vars' : 'off' ,
56+ 'no-undef' : 'off' ,
57+ '@typescript-eslint/no-unused-vars' : [ 'error' , { varsIgnorePattern : '^([A-Z_]|motion$)' , argsIgnorePattern : '^(_|[A-Z])' , destructuredArrayIgnorePattern : '^_' } ] ,
58+ 'react-refresh/only-export-components' : 'warn' ,
59+ } ,
60+ } ,
3161 {
3262 files : [ 'public/sw.js' ] ,
3363 languageOptions : {
0 commit comments