This repository was archived by the owner on Mar 4, 2026. It is now read-only.
forked from coleam00/remote-agentic-coding-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
85 lines (80 loc) · 2.81 KB
/
eslint.config.mjs
File metadata and controls
85 lines (80 loc) · 2.81 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
83
84
85
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';
export default tseslint.config(
// Global ignores (applied to all configs)
{
ignores: [
'node_modules/**',
'dist/**',
'coverage/**',
'.agents/examples/**',
'docs/**',
'webui/**',
'test/**',
'workspace/**',
'**/*.js', // Ignore JS files (like jest.config.js)
'*.mjs', // Ignore ESLint config itself
'**/*.test.ts', // Ignore test files (excluded from tsconfig)
],
},
// Base configs
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
// Prettier integration (disables conflicting rules)
prettierConfig,
// Project-specific settings
{
files: ['src/**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
// Enforce patterns from codebase analysis
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
// Allow both IInterface and Interface patterns
custom: { regex: '^I?[A-Z]', match: true },
},
{ selector: 'typeAlias', format: ['PascalCase'] },
{ selector: 'function', format: ['camelCase'] },
{ selector: 'variable', format: ['camelCase', 'UPPER_CASE'] },
],
// Relax some overly strict rules for pragmatic TypeScript
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
'@typescript-eslint/no-unnecessary-condition': 'warn',
'@typescript-eslint/no-deprecated': 'warn',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/consistent-generic-constructors': 'warn',
},
}
);