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