-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
61 lines (59 loc) · 1.51 KB
/
eslint.config.js
File metadata and controls
61 lines (59 loc) · 1.51 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
import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
{
files: ['src/**/*.ts', 'test/**/*.ts', 'scripts/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// TypeScript-aware rules
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports' }],
// General rules
'no-console': 'warn',
'prefer-const': 'warn',
'no-var': 'error',
eqeqeq: ['error', 'always'],
},
},
{
files: ['src/cli/**/*.ts', 'src/eval/**/*.ts'],
rules: {
'no-console': 'off',
},
},
{
files: ['src/mcp/server.ts'],
rules: {
'no-console': 'off',
},
},
{
files: ['scripts/**/*.ts', 'test/**/*.ts'],
rules: {
'no-console': 'off',
// Tests commonly need `any` for mocks/stubs — only enforce in src/
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
ignores: [
'dist/**',
'node_modules/**',
'src/dashboard/client/**',
'*.js',
'!eslint.config.js',
],
},
eslintConfigPrettier,
];