1+ import js from '@eslint/js' ;
2+ import tsPlugin from '@typescript-eslint/eslint-plugin' ;
3+ import tsParser from '@typescript-eslint/parser' ;
4+
5+ export default [
6+ {
7+ files : [ 'src/**/*.ts' ] ,
8+ languageOptions : {
9+ parser : tsParser ,
10+ parserOptions : {
11+ ecmaVersion : 2020 ,
12+ sourceType : 'module'
13+ } ,
14+ globals : {
15+ console : 'readonly' ,
16+ document : 'readonly' ,
17+ window : 'readonly' ,
18+ process : 'readonly'
19+ }
20+ } ,
21+ plugins : {
22+ '@typescript-eslint' : tsPlugin
23+ } ,
24+ rules : {
25+ // Only enable essential rules to avoid overwhelming output
26+ '@typescript-eslint/no-unused-vars' : [ 'warn' , {
27+ argsIgnorePattern : '^_' ,
28+ varsIgnorePattern : '^_|^ContentTypeResponse$|^getData$|^EntryResponse$|^e$|^error$' ,
29+ ignoreRestSiblings : true
30+ } ] ,
31+ '@typescript-eslint/no-explicit-any' : 'off' , // Too many to fix right now
32+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
33+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
34+ '@typescript-eslint/no-inferrable-types' : 'off' ,
35+ 'no-undef' : 'off' , // TypeScript handles this
36+ 'no-prototype-builtins' : 'off' , // Common pattern in this codebase
37+ 'no-async-promise-executor' : 'off' , // Disable for now
38+ // Disable problematic rules that aren't configured
39+ '@cspell/spellchecker' : 'off' ,
40+ 'prettier/prettier' : 'off'
41+ }
42+ } ,
43+ {
44+ files : [ 'test/**/*.ts' ] ,
45+ languageOptions : {
46+ parser : tsParser ,
47+ parserOptions : {
48+ ecmaVersion : 2020 ,
49+ sourceType : 'module' ,
50+ project : './tsconfig.json'
51+ } ,
52+ globals : {
53+ jest : 'readonly' ,
54+ describe : 'readonly' ,
55+ it : 'readonly' ,
56+ expect : 'readonly' ,
57+ beforeAll : 'readonly' ,
58+ beforeEach : 'readonly' ,
59+ afterAll : 'readonly' ,
60+ afterEach : 'readonly'
61+ }
62+ } ,
63+ plugins : {
64+ '@typescript-eslint' : tsPlugin
65+ } ,
66+ rules : {
67+ ...tsPlugin . configs . recommended . rules ,
68+ '@typescript-eslint/no-explicit-any' : 'off'
69+ }
70+ } ,
71+ {
72+ ignores : [
73+ 'dist/**' ,
74+ 'coverage/**' ,
75+ 'node_modules/**' ,
76+ '*.js' ,
77+ 'jest.config.js' ,
78+ 'rollup.config.js' ,
79+ 'eslint.config.js'
80+ ]
81+ }
82+ ] ;
0 commit comments