diff --git a/.oxlintrc.json b/.oxlintrc.json index 7c4a227..a75aed8 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -13,6 +13,8 @@ "eslint/no-undefined": "off", "eslint/sort-keys": "off", "eslint/id-length": "off", + "eslint/capitalized-comments": "off", + "eslint/no-ternary": "off", "import/no-named-export": "off", "eslint/one-var": "off", "import/group-exports": "off", diff --git a/development/tooling.md b/development/tooling.md index b619050..d07e768 100644 --- a/development/tooling.md +++ b/development/tooling.md @@ -104,25 +104,48 @@ Type-aware oxlint is enabled via `options.typeAware: true` in `.oxlintrc.json` #### Decision (2026-09) -Known type-aware false positives are silenced with source-level `oxlint-disable` -directives (see `src/pattern.ts`, `src/match.ts`, `src/index.test.ts`), not with -rules disabled in `.oxlintrc.json`. +A type-aware rule that false-positives is silenced with a source-level +`oxlint-disable` directive (see `src/pattern.ts`, `src/match.ts`, +`src/index.test.ts`), not by turning the rule off in `.oxlintrc.json`. #### Why - The disable sits next to the code it silences, visible to anyone reading the source. +- The rule stays on everywhere else, so only the mis-firing line is exempted. #### Rejected -- A project-wide disable in `.oxlintrc.json`: it hides the suppression from the - reader of the affected code. +- A project-wide disable in `.oxlintrc.json` for a false positive: it hides the + exemption from the reader of the affected code and switches the rule off + repo-wide for a one-site problem. #### Known issue - A source-level disable is a _human_ last resort. AI agents must not add one; they fix the type at its root (see [AGENTS.md ยง Never do](../AGENTS.md#never-do)). +### Unwanted stylistic rules are turned off in the config + +#### Decision (2026-09) + +A stylistic rule the project rejects is `"off"` in the `.oxlintrc.json` `rules` +map, not silenced at a use site. Current entries: `eslint/capitalized-comments` +(comments may start lowercase) and `eslint/no-ternary` (ternaries are allowed), +joining the oxfmt-superseded rules already off. + +#### Why + +- The rule is wrong for the whole project, not mis-firing at one site, so there + is no line to annotate. +- Keeping the two mechanisms separate keeps a source-level `oxlint-disable` + meaningful: it marks a lone exception. + +#### Rejected + +- A source-level `oxlint-disable` per use: the same exemption repeated at every + site, and oxfmt can move the site. + ### `check:tsc` runs first #### Decision (2026-09)