-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy patheslint.config.ts
More file actions
93 lines (89 loc) · 2 KB
/
eslint.config.ts
File metadata and controls
93 lines (89 loc) · 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
83
84
85
86
87
88
89
90
91
92
93
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
export default tseslint.config(
// Ignore patterns (similar to old .eslintrc.js ignorePatterns)
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/coverage/**',
'**/build/**',
'**/.next/**',
'*.js',
'*.mjs',
'*.cjs',
'jest.config.js',
'jest-resolver.js',
'jest.e2e.config.ts',
],
},
// Base TS recommended rules
...tseslint.configs.recommended,
// Global settings and rules
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
import: importPlugin,
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
},
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-empty-function': 'warn',
'no-console': 'off',
// STRICT: Error on extraneous dependencies
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.test.{ts,tsx,js,jsx}',
'**/*.spec.{ts,tsx,js,jsx}',
'**/__tests__/**',
'**/test/**',
'**/*.config.{ts,js,cjs,mjs}',
'**/vite.config.{ts,js,mjs,cjs}',
'**/jest.setup.{ts,js}',
'**/scripts/**',
],
optionalDependencies: false,
peerDependencies: false,
includeTypes: true,
// Monorepo support: check dependencies in both root and package-level
packageDir: [
'.',
'packages/atp-compiler',
'packages/client',
'packages/langchain',
'packages/mcp-adapter',
'packages/protocol',
'packages/provenance',
'packages/providers',
'packages/runtime',
'packages/server',
],
},
],
},
}
);