--- name: contribute-house-config description: Use when the user wants to add, change, or fix a rule in @dnunez24/config itself -- this repository, not a consumer of it. --- # Contribute to shared config ## Which file owns which rule | File | Owns | | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `biome/base.jsonc` | The strictness model: bug-catching groups (`a11y`, `correctness`, `performance`, `security`, `suspicious`) as group-level `"error"` strings; `complexity`, `style`, `nursery` as explicit allow-lists. | | `biome/{node,bun,web,react,next,astro}.jsonc` | Relaxations and additions relative to their parent, always via `overrides`, never a top-level rule change. | | `tsconfig/base.json` | Strictness flags. Never `outDir`, `rootDir`, `include`, `exclude`, or `paths` -- those leak into `node_modules` when resolved from a shipped config. | | `tsconfig/{node,bun,web,react,next,astro}.json` | `module`, `moduleResolution`, `types`, `jsx` per runtime/framework. Restate `lib` in full whenever it changes -- array options replace, not merge, across `extends`. | | `tsconfig/library.json` | The emit-mixin (`declaration`, `sourceMap`, `isolatedDeclarations`). No `extends`, no path options. | | `src/cli/*.ts` | The `config init` CLI: detection, managed-region markers, the file plan, and the writer. | | `plugin/` | The Agent Plugin: skills, hooks, Language Server Protocol (LSP) config. Distributed from git, never npm. | `style`, `complexity`, and `nursery` in `base.jsonc` are explicit allow-lists: a new rule does not exist in this config until it is named there. ## Adding or changing a rule 1. Add the rule to the right group in `biome/base.jsonc` (or the right contextual layer's `overrides`), with a one-line `//` comment if it needs justification. 2. Add a fixture violation under `fixtures//` proving the rule fires, and -- if the change also relaxes something -- a negative case proving it stays clean where it should. 3. Update the snapshot: `pnpm vitest run tests/biome.test.ts -u`, then read the diff in `tests/__snapshots__/biome.test.ts.snap` and confirm every changed line is intentional. 4. Run `pnpm changeset` and describe the change from a consumer's point of view. ## Full verification sequence before a release ```sh pnpm build && pnpm check && pnpm typecheck && pnpm test && pnpm lint:pkg ``` Then `pnpm changeset version` and `pnpm changeset publish`. ## Platform facts worth re-reading before touching `biome/*.jsonc` - Biome does not resolve transitive `extends` (see `use-shared-config`'s skill and every `fixtures/*/biome.jsonc`) -- fixtures list their own full ancestor chain for the same reason a consumer must. - A rule group given as an object (e.g. `{"preset": "all"}`) enables the same rules as the equivalent group string, but at each rule's **default** severity, which is often `"info"` -- `biome lint` exits 0 even with findings. Group strings (`"correctness": "error"`) are the only safe way to force error severity across a whole group. - Framework-specific rules (`noSolidDestructuredProps`, `useQwikValidLexicalScope`, and others) are not reliably gated by Biome's domain detection and can fire on completely idiomatic code in a framework this package does not ship a layer for. If a new rule addition trips on the package's own fixtures or `src/`, that is real signal, not a fixture bug -- verify against the rule's own `biome explain ` docs before disabling it.