-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheslint.config.js
More file actions
122 lines (120 loc) · 3.66 KB
/
Copy patheslint.config.js
File metadata and controls
122 lines (120 loc) · 3.66 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
const vitestGlobals = {
afterAll: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
beforeEach: 'readonly',
describe: 'readonly',
expect: 'readonly',
it: 'readonly',
test: 'readonly',
vi: 'readonly',
};
export default tseslint.config(
{
ignores: [
'**/dist/',
'**/node_modules/',
'**/*.d.ts',
'**/*.astro',
'coverage/',
'eslint.config.js',
'apps/web/src/static-demo/',
'apps/web/test-results/',
'apps/www/public/',
],
},
js.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
extends: [tseslint.configs.recommendedTypeChecked],
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: [
'apps/control-plane/vitest.load.config.ts',
'apps/web/e2e/*.ts',
'apps/web/playwright.config.ts',
'apps/web/vitest.config.ts',
],
},
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
// 2026-06-12 baseline: 2,769 existing unsafe assignments, low signal for initial lint gate.
'@typescript-eslint/no-unsafe-assignment': 'off',
// 2026-06-12 baseline: 498 existing unsafe arguments, low signal for initial lint gate.
'@typescript-eslint/no-unsafe-argument': 'off',
// 2026-06-12 baseline: 8,722 existing unsafe calls, low signal for initial lint gate.
'@typescript-eslint/no-unsafe-call': 'off',
// 2026-06-12 baseline: 6,793 existing unsafe member accesses, low signal for initial lint gate.
'@typescript-eslint/no-unsafe-member-access': 'off',
// 2026-06-12 baseline: 785 existing unsafe returns, low signal for initial lint gate.
'@typescript-eslint/no-unsafe-return': 'off',
// 2026-06-12 baseline: 116 existing redundant constituents, low signal for initial lint gate.
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/unbound-method': 'error',
// Stylistic; Prettier owns formatting and this baseline avoids style-only churn.
'prefer-const': 'off',
},
},
{
files: ['**/*.{test,spec}.{ts,tsx}', '**/test/**/*.{ts,tsx}', 'apps/web/e2e/**/*.ts'],
rules: {
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
{
files: ['**/*.mjs'],
languageOptions: {
globals: globals.node,
},
},
{
files: ['apps/web/**/*.{ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...vitestGlobals,
},
},
},
{
files: ['apps/web/*.config.ts', 'apps/web/e2e/**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['apps/control-plane/**/*.{ts,tsx}', 'packages/sandbox-bridge/**/*.{ts,tsx}'],
languageOptions: {
globals: {
...globals.node,
...vitestGlobals,
},
},
},
);