Skip to content

chore: adopt Biome for linting and formatting - #10

Merged
kjellberg merged 1 commit into
kiqr:mainfrom
kjellbergzoey:chore/adopt-biome
Jun 7, 2026
Merged

chore: adopt Biome for linting and formatting#10
kjellberg merged 1 commit into
kiqr:mainfrom
kjellbergzoey:chore/adopt-biome

Conversation

@kjellbergzoey

Copy link
Copy Markdown
Contributor

Summary

Adopts Biome as the single tool for linting and formatting.

  • Adds @biomejs/biome as a devDependency and a biome.json configured for this project: TypeScript + JSX/Ink React, 2-space indentation, single quotes, ES modules, recommended linter rules, and organize-imports (Biome 2.x assist action).
  • Adds npm scripts: lint (biome check .) and format (biome check --write .).
  • Adds a dedicated, fast lint job to CI (single Node version) that runs before/alongside the existing test matrix.

About the large diff

The bulk of this PR is the one-time biome check --write . format pass applied across the whole repo. This is expected for an "adopt Biome" change. There are no behavioral changes — only formatting and import ordering.

After applying, npm run typecheck, npm test (70 passing), and npm run build all remain green.

A note on disabled rules

A few recommended lint rules are disabled in biome.json because they conflict with the project's existing strict tsconfig or React/Ink patterns:

  • noNonNullAssertion and useLiteralKeys — clash with noUncheckedIndexedAccess / noPropertyAccessFromIndexSignature from @sindresorhus/tsconfig; their autofixes would break typecheck.
  • useExhaustiveDependencies and noArrayIndexKey — would require behavioral refactors of Ink components, out of scope for a formatting PR.

These can be revisited in follow-ups if desired.

🤖 Generated with Claude Code

Adds @biomejs/biome with a project config (biome.json): 2-space indent,
single quotes, no bracket spacing, organize-imports, recommended lint
rules (with a few project-specific rules disabled where they clash with
the strict tsconfig or Ink/React patterns). Adds 'lint' and 'format'
npm scripts and a dedicated lint job in CI.

The large diff is the one-time 'biome check --write' format pass over
the existing codebase. Two lint fixes beyond formatting: a string-concat
-> template literal in db/list.tsx, and an empty destructure pattern in
wp.tsx.

Rebuilt on current main (post kiqr#11-kiqr#16) to resolve merge conflicts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kjellbergzoey

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (after #11#16 merged) to clear the conflicts. The Biome format pass was regenerated on top of the latest code rather than hand-resolving the 47-file diff, so the result is deterministic.

Now green end-to-end: npm run lint clean (62 files), npm run typecheck, npm test (111 passed), npm run build all pass. Two small lint fixes beyond pure formatting: string-concat → template literal in db/list.tsx, and an empty destructure pattern in wp.tsx. Ready to merge. 🤖

@kjellberg
kjellberg merged commit 8344161 into kiqr:main Jun 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants