forked from deepseek-ai/deepseek-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.oxlintrc.json
More file actions
321 lines (321 loc) · 10.8 KB
/
Copy path.oxlintrc.json
File metadata and controls
321 lines (321 loc) · 10.8 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [],
"categories": {
"correctness": "off"
},
"options": {
"reportUnusedDisableDirectives": "warn",
"typeAware": true
},
"env": {
"builtin": true
},
"ignorePatterns": [
"**/lib/**",
"**/node_modules/**",
"**/.sessions/**",
".claude/**", // Harness-local state belongs to other checkouts, not this checkout's sources.
"**/.doc-typecheck-*/**",
"**/.node-next-types-*/**",
"**/.oxlint-contract-*/**", // Scratch files created by the executable lint-contract tests.
"**/oxlint-contract-*", // Flat probes use real TypeScript project include paths.
"packages/typert/generator/tests/fixtures/type-model/**", // tsgolint rejects this fixture's preserved project shapes before rules run.
"website/.generated/**",
"vendor/**", // Vendored source keeps upstream style and idioms.
"native/**", // The imported landlock-run subtree has its own gates; see native/README.md.
"**/*.js",
"**/*.mjs",
"**/*.config.ts", // Tool and app configs are outside the repository TypeScript programs.
"packages/client/tsdown.client.ts" // Shared client build preset, also outside a TypeScript program.
],
"overrides": [
{
// Shared strict type-aware rules. Source/test differences stay in the short overrides below.
"files": [
"packages/*/*/src/**/*.{ts,tsx}",
"packages/*/*/tests/**/*.{ts,tsx}",
"apps/*/src/**/*.{ts,tsx}",
"apps/*/tests/**/*.{ts,tsx}",
"examples/**/*.{ts,tsx}",
"scripts/**/*.{ts,tsx}",
"website/**/*.{ts,tsx}"
],
"rules": {
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"no-array-constructor": "error",
"no-unused-expressions": "error",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-useless-constructor": "error",
"typescript/await-thenable": "error",
"typescript/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 10
}
],
"typescript/no-array-delete": "error",
"typescript/no-base-to-string": "error",
"typescript/no-confusing-void-expression": "error",
"typescript/no-deprecated": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-duplicate-type-constituents": "error",
"typescript/no-dynamic-delete": "error",
"typescript/no-empty-object-type": "off", // Merge-extensible maps intentionally use empty object types.
"typescript/no-explicit-any": "error", // Every intentional any needs a narrow suppression with rationale.
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-extraneous-class": "error",
// Lost promises in the agent loop are the repository's highest-value linted bug class.
"typescript/no-floating-promises": "error",
"typescript/no-for-in-array": "error",
"typescript/no-implied-eval": "error",
"typescript/no-invalid-void-type": "off", // Event signatures intentionally use void in source.
"typescript/no-meaningless-void-operator": "error",
"typescript/no-misused-new": "error",
"typescript/no-misused-promises": "error",
"typescript/no-misused-spread": "error",
"typescript/no-mixed-enums": "error",
"typescript/no-namespace": "off", // Cordis Config namespaces are the repository idiom.
"typescript/no-non-null-asserted-nullish-coalescing": "error",
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/no-redundant-type-constituents": "error",
"typescript/no-require-imports": "error",
"typescript/no-this-alias": "error",
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-template-expression": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unnecessary-type-conversion": "error",
"typescript/no-unnecessary-type-parameters": "error",
"typescript/no-unsafe-argument": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-call": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-enum-comparison": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-unsafe-member-access": "error",
"typescript/no-unsafe-return": "error",
"typescript/no-unsafe-unary-minus": "error",
"typescript/no-useless-default-assignment": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/prefer-literal-enum-member": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/prefer-promise-reject-errors": "error",
"typescript/prefer-reduce-type-parameter": "error",
"typescript/prefer-return-this-type": "error",
"typescript/related-getter-setter-pairs": "error",
"typescript/restrict-plus-operands": [
"error",
{
"allowAny": false,
"allowBoolean": false,
"allowNullish": false,
"allowNumberAndString": false,
"allowRegExp": false
}
],
"typescript/return-await": [
"error",
"error-handling-correctness-only"
],
"typescript/triple-slash-reference": "error",
"typescript/unbound-method": "error",
"typescript/unified-signatures": "error",
"typescript/use-unknown-in-catch-callback-variable": "error",
"no-void": "off" // void foo() marks deliberate fire-and-forget arrow listeners.
},
"plugins": [
"typescript"
]
},
{
"files": [
"packages/*/*/src/**/*.{ts,tsx}",
"apps/*/src/**/*.{ts,tsx}",
"examples/**/*.{ts,tsx}",
"scripts/**/*.{ts,tsx}",
"website/**/*.{ts,tsx}"
],
"rules": {
"typescript/no-non-null-assertion": "error",
"typescript/no-unnecessary-condition": [
"error",
{
"allowConstantLoopConditions": true
}
],
"typescript/only-throw-error": "error",
"typescript/require-await": "error",
"typescript/restrict-template-expressions": [
"error",
{
"allowNumber": true,
"allowBoolean": true
}
],
"typescript/switch-exhaustiveness-check": [
"error",
{
"considerDefaultExhaustiveForUnions": true
}
]
},
"plugins": [
"typescript"
]
},
{
"files": [
"examples/**/*.ts"
],
"rules": {
"typescript/require-await": "off" // Demo callbacks conform to async interfaces without awaiting.
},
"plugins": [
"typescript"
]
},
{
"files": [
"packages/*/*/tests/**/*.{ts,tsx}",
"apps/*/tests/**/*.{ts,tsx}",
"examples/*/tests/**/*.{ts,tsx}",
"scripts/**/*.spec.{ts,tsx}"
],
"rules": {
"typescript/no-invalid-void-type": "error",
"typescript/no-non-null-assertion": "off", // Assertions commonly follow an expect() that proves presence.
"typescript/no-unnecessary-condition": "off",
"typescript/only-throw-error": "off", // Tests deliberately exercise non-Error throws.
"typescript/require-await": "off", // Mock execute() implementations must retain async signatures.
"typescript/restrict-template-expressions": "off"
},
"plugins": [
"typescript"
]
},
{
"files": [
"packages/**/*.{ts,tsx}",
"apps/**/*.{ts,tsx}",
"examples/**/*.{ts,tsx}",
"scripts/**/*.{ts,tsx}",
"website/**/*.{ts,tsx}"
],
"rules": {
"sonarjs/duplicates-in-character-class": "error",
"sonarjs/no-all-duplicated-branches": "error",
"sonarjs/no-duplicate-in-composite": "error",
"sonarjs/no-duplicate-test-title": "error",
"sonarjs/no-identical-conditions": "error",
"sonarjs/no-identical-expressions": "error",
"sonarjs/no-identical-functions": "error",
"sonarjs/no-duplicated-branches": "error"
},
"jsPlugins": [
"eslint-plugin-sonarjs"
]
},
{
"files": [
"packages/**/*.{ts,tsx}",
"apps/**/*.{ts,tsx}",
"examples/**/*.{ts,tsx}",
"scripts/**/*.{ts,tsx}",
"website/**/*.{ts,tsx}"
],
"rules": {
"@stylistic/indent": [
"error",
2
],
"@stylistic/semi": [
"error",
"never"
],
"@stylistic/quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"@stylistic/comma-dangle": [
"error",
"always-multiline"
],
"@stylistic/eol-last": [
"error",
"always"
],
"@stylistic/no-trailing-spaces": "error",
"@stylistic/object-curly-spacing": [
"error",
"always"
],
"@stylistic/arrow-parens": [
"error",
"as-needed",
{
"requireForBlockBody": true
}
],
"@stylistic/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "none"
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
// Validation-only: line length has no safe formatter fix.
"@stylistic/max-len": [
"error",
{
"code": 140,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
]
},
"jsPlugins": [
"@stylistic/eslint-plugin"
]
},
{
// The project-free staged profile re-includes this syntax-coverage fixture.
"files": [
"packages/typert/generator/tests/fixtures/type-model/**/*.{ts,tsx}"
],
"rules": {
"typescript/no-explicit-any": "off"
}
},
{
// TypeGraph coverage must retain source-authored syntax that the normal quote rule forbids.
"files": [
"packages/typert/generator/tests/fixtures/type-model/packages/host/src/models.ts"
],
"rules": {
"@stylistic/quotes": "off"
}
}
]
}