-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.oxlintrc.jsonc
More file actions
44 lines (44 loc) · 1.91 KB
/
Copy path.oxlintrc.jsonc
File metadata and controls
44 lines (44 loc) · 1.91 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
// Mirrors synclayer's oxlint setup. The `correctness` category (native recommended)
// is enabled by default. Setting `plugins` overrides the default set; we keep
// typescript + oxc and add `vitest` (rules are API-gated to test files). `react` is
// omitted until tart has React code.
"plugins": ["typescript", "oxc", "vitest", "import"],
"ignorePatterns": ["**/node_modules/**", "**/dist/**"],
"rules": {
// Tighten barrel files to errors.
"oxc/no-barrel-file": "error",
// Keep visible as warnings rather than off.
"typescript/no-explicit-any": "error",
"typescript/no-non-null-assertion": "error",
// No type assertions (`x as T`, `<T>x`): they bypass the type system and hide unsound code.
// Parse with schemas or narrow with type guards instead; `satisfies` checks without lying.
// `as const` stays allowed - const assertions only narrow literals and cannot lie.
"typescript/consistent-type-assertions": ["error", { "assertionStyle": "never" }],
// `@effect/vitest`'s `it.effect(() => Effect.gen(...))` places assertions inside an
// Effect generator, which the vitest plugin can't see as a test block. Disabled to
// avoid a false positive on every Effect test.
"vitest/no-standalone-expect": "off",
// Disallow `.ts` extensions in imports; TypeScript resolves them without extensions.
"import/extensions": ["error", "never"],
},
"overrides": [
{
// The vitest-config package needs explicit `.ts` extensions for Node's strict
// ESM resolution when Vite externalizes the workspace package.
"files": ["packages/vitest-config/**/*.ts"],
"rules": {
"import/extensions": "off",
},
},
{
// Package entrypoints are intentional public API barrels; the no-barrel rule
// remains enabled for internal modules.
"files": ["packages/*/src/index.ts"],
"rules": {
"oxc/no-barrel-file": "off",
},
},
],
}