Skip to content

feat: add biome linter and formatter#19

Merged
tbui17 merged 6 commits intomainfrom
feat/add-biome-linter-formatter
Mar 18, 2026
Merged

feat: add biome linter and formatter#19
tbui17 merged 6 commits intomainfrom
feat/add-biome-linter-formatter

Conversation

@tbui17
Copy link
Owner

@tbui17 tbui17 commented Mar 18, 2026

Summary

  • Add @biomejs/biome as dev dependency with biome.json config
  • Add lint, format, and fix npm scripts to package.json
  • Apply Biome formatting across all source and test files
  • Update AGENTS.md with linting guidelines and commands

Test plan

  • CI passes (typecheck, build, unit tests, E2E tests)
  • npm run lint passes with no errors
  • npm run format passes with no errors
  • Verify no behavioral changes — formatting only

🤖 Generated with Claude Code

tbui17 and others added 6 commits March 18, 2026 00:08
- Add @biomejs/biome as dev dependency with biome.json config
- Add lint, format, and fix npm scripts
- Apply Biome formatting across all source and test files
- Update AGENTS.md with linting guidelines and commands
- Sort devDependencies alphabetically in package.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI uses bun install --frozen-lockfile which requires an up-to-date
bun.lockb. The npm package-lock.json was committed by mistake.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix fetch mock assignments with `as unknown as typeof fetch` for Bun's
  preconnect property requirement
- Narrow FetchResult discriminated union before accessing .data/.error
- Add missing properties to OpenCodeModelEntry type (max_completion_tokens,
  supported_parameters, is_moderated, default_parameters)
- Fix createToastBody to accept input type (variant optional with default)
- Import AddressInfo from node:net instead of node:http
- Fix non-null assertions for array access and possibly-undefined values
- Cast ZodType to any for .shape access in schema tests
- Fix plugin test to match actual plugin behavior (no return value)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 'normal' state checked `next !== undefined` before advancing `i`,
causing an infinite loop when processing the final character of input
(where next is always undefined).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add GritQL plugin to detect dynamic import() expressions (no lazy imports)
- Enable noCommonJs rule at error level to enforce ESM imports over require()

These rules ensure consistent use of static ESM imports for better
tree-shaking and static analysis.
Tests that write to the real config now reset it to empty models in
beforeEach, ensuring updateModels starts from a clean state regardless
of what previous tests may have written.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tbui17 tbui17 merged commit 76a8c07 into main Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant