Conversation
The approved stack for sferarc repositories uses Biome for lint and format, lefthook for pre-commit checks and knip for unused code. peeksafe had none of them, so style drifted file by file and unused imports went unnoticed. Add all three from the catalog, with biome.json in the house style used by the other sferarc repositories. noNonNullAssertion is off: with noUncheckedIndexedAccess the numerical loops assert about 200 in-bounds reads, and rewriting them would change code for no behavioural gain. CI runs `pnpm lint` and `pnpm knip` on every leg.
Apply `biome format` with no other change, so the lint fixes that follow can be reviewed on their own. Quotes become double, lines wrap at 100 columns.
Apply the safe fixes Biome offers (sorted imports, `import type` where only types are used, `**` over Math.pow, unused imports removed) and fix the rest by hand. The changelog script's `escape` helper shadowed the global of that name and is now `escapeRegExp`. The unused `sb` and `nb` parameters of rawLogE keep their position for the call sites and gain an underscore. test/exports.test.ts read source text with single-quote patterns. After the format change its import stripping matched nothing, so the "every export is used in a test" check passed on imports alone, and the error-code check missed constructor calls that now wrap. Both patterns now match the formatted source.
Review:
|
# Conflicts: # brain/development/toolchain.md
Review of #40 found three gaps. knip ran with no configuration, so what it checked depended on its zero-config inference in whatever version the catalog names; knip.json now names the entry and project files and config hints fail the run. Nothing checked lefthook.yml, so a bad key would only show as unformatted commits; CI now runs `lefthook validate`, and CONTRIBUTING says how to install the hook by hand. NOTICE listed three of the six dev dependencies and ships in the tarball, so it now refers to package.json instead of enumerating them.
# Conflicts: # brain/development/ci.md
Adds Biome (house config), lefthook pre-commit and knip, formats the code, and fixes what Biome's recommended rules flagged. CI runs lint and knip. Stacked on #39.