Skip to content

Commit 9c32733

Browse files
Merge pull request #46 from script-development/armory-oxlint-explicit-config
Explicit oxlint config: correctness as error
2 parents 0a4526f + 410e8a8 commit 9c32733

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.oxlintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["typescript", "unicorn", "oxc"],
4+
"categories": {
5+
"correctness": "error"
6+
},
7+
"rules": {},
8+
"env": {
9+
"builtin": true
10+
}
11+
}

CLAUDE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Shared frontend service packages monorepo under the `@script-development` npm sc
77
- **Language:** TypeScript 5.9+ (strict mode, `verbatimModuleSyntax`)
88
- **Build:** tsdown (Rolldown/oxc) — dual ESM + CJS output
99
- **Test:** vitest 4 (100% coverage threshold) + Stryker (90% mutation threshold)
10-
- **Lint:** oxlint
10+
- **Lint:** oxlint (explicit config at `.oxlintrc.json`)
1111
- **Format:** oxfmt
1212
- **Package lint:** publint + attw (Are The Types Wrong)
1313
- **Publish:** OIDC Trusted Publishing to public npm registry (no stored tokens)
@@ -54,6 +54,16 @@ Shared frontend service packages monorepo under the `@script-development` npm sc
5454

5555
**Build before typecheck.** Cross-package type resolution requires built `.d.mts` files. The CI pipeline enforces this order.
5656

57+
## Lint Rules
58+
59+
Lint configuration lives at `.oxlintrc.json` (repo-root, no per-package overrides). The explicit config declares three defaults so rule additions/removals land as a deliberate diff rather than silent upstream drift when oxlint bumps:
60+
61+
- **Plugins:** `typescript`, `unicorn`, `oxc` — the three plugins enabled by oxlint's own defaults.
62+
- **Categories:** `correctness: "error"` — all 107 Correctness rules fail CI (was `warn`, so violations were silently tolerated pre-config).
63+
- **`perf`, `suspicious`, `pedantic`, `style`, `restriction`, `nursery`:** unset — library posture is Correctness-only, opt-in per-rule for anything else.
64+
65+
To add a rule, set it in the `rules` object (e.g. `"perf/no-accumulating-spread": "error"`). To disable a default, set it to `"off"`. To opt into a whole category, add it to `categories` (be deliberate — `pedantic` has false positives, `nursery` is unstable). See `npx oxlint --rules` for the full catalog with default-on/off markers.
66+
5767
## Adding a Package
5868

5969
1. Create `packages/{name}/` with `package.json`, `tsconfig.json`, `tsdown.config.ts`, `vitest.config.ts`

0 commit comments

Comments
 (0)