-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
77 lines (75 loc) · 2.38 KB
/
Copy patheslint.config.js
File metadata and controls
77 lines (75 loc) · 2.38 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
// ESLint flat config — DeepCode monorepo.
// Spec: docs/DEVELOPMENT_PLAN.md §0 (engineering hygiene)
//
// Keep this list minimal: code style is enforced by Prettier; ESLint catches
// correctness issues only. Type-aware rules pull from each package's tsconfig.
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
{
ignores: [
'**/dist/**',
'**/dist-electron/**',
'**/node_modules/**',
'**/target/**', // Rust/Cargo build output (generated JS in src-tauri/target)
'**/.tsbuildinfo',
'.claude/**', // sibling agent worktrees — not part of this checkout's lint surface
'release-artifacts/**',
'apps/desktop/electron/**', // requires electron types — pending M6-rest
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
process: 'readonly',
console: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
URL: 'readonly',
URLSearchParams: 'readonly',
AbortController: 'readonly',
AbortSignal: 'readonly',
TextEncoder: 'readonly',
TextDecoder: 'readonly',
fetch: 'readonly',
crypto: 'readonly',
},
},
rules: {
// Disable rules that conflict with current pragmatic patterns:
'@typescript-eslint/no-explicit-any': 'off', // we use `unknown` cast pattern
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-constant-condition': ['warn', { checkLoops: false }],
'no-async-promise-executor': 'off', // SessionManager uses this pattern
// Tests deliberately use any
'no-unused-vars': 'off',
},
},
{
// Tests can be looser
files: ['**/*.test.ts', '**/*.test.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
},
},
];