Skip to content

chore(shared): replace eslint and prettier with biome#88

Merged
designcode merged 7 commits intomainfrom
chore/replace-eslint-with-biome
Apr 23, 2026
Merged

chore(shared): replace eslint and prettier with biome#88
designcode merged 7 commits intomainfrom
chore/replace-eslint-with-biome

Conversation

@designcode
Copy link
Copy Markdown
Collaborator

@designcode designcode commented Apr 23, 2026

Summary

  • Consolidate linting and formatting into a single Biome 2.4.12 toolchain — drops eslint, @eslint/js, typescript-eslint, and prettier in favor of @biomejs/biome.
  • Move lint/format scripts to the repo root (one binary covers the monorepo) and update the husky pre-commit hook to run npm run check.
  • Apply Biome's safe + unsafe auto-fixes across the repo (e.g. node: import protocol, explicit parseInt radix, Number.isNaN, optional chains, Date.now()).
  • Bundle dependency bumps for shared, keyv-tigris, react, agent-kit, and storage.

Biome config notes

  • Formatter mirrors the prior Prettier settings: single quotes, semicolons, 2-space indent, 80-col line width, es5 trailing commas.
  • Linter is on recommended, with two intentional opt-outs to keep this PR scoped to a tooling swap rather than a code-style overhaul:
    • style/noNonNullAssertion: off — the prior ESLint config didn't enforce this and the codebase relies on the pattern in ~100 places.
    • a11y disabled for packages/react — the React package wasn't previously linted at all; can be revisited as intentional follow-up work.

Test plan

  • npm run check is clean
  • npm run build succeeds across all workspaces
  • npm test passes (207 tests across all packages)
  • CI passes on PR

🤖 Generated with Claude Code


Note

Medium Risk
Switches the repo’s lint/format/check pipeline and pre-commit hook to Biome, which can affect developer workflow and CI enforcement across all workspaces. Also updates several dependency versions/lockfile entries, which may introduce minor integration/regression risk.

Overview
Replaces the ESLint + Prettier toolchain with Biome by adding biome.json, removing eslint.config.js and .prettierrc, and updating root scripts to use biome lint/format/check (plus new check:fix).

Updates the Husky pre-commit hook to run npm run check and drops per-package lint/format scripts (e.g., agent-kit, iam) in favor of the root Biome workflow, with minor import ordering/tidying changes in agent-kit sources/tests.

Refreshes dependencies and lockfile (adds @biomejs/biome, removes ESLint/Prettier/TypeScript-ESLint, bumps vitest and several AWS/Tigris-related packages to newer patch/minor versions).

Reviewed by Cursor Bugbot for commit 991cf69. Bugbot is set up for automated code reviews on this repo. Configure here.

designcode and others added 7 commits April 23, 2026 10:25
Consolidate linting and formatting into a single Biome 2.4.12 toolchain.
Drops eslint, @eslint/js, typescript-eslint, and prettier in favor of
@biomejs/biome.

- Add biome.json mirroring prior Prettier settings (single quotes, semis,
  2-space indent, 80-col, trailing commas es5)
- Linter on recommended with noNonNullAssertion off (not enforced before)
  and a11y disabled for packages/react (was previously unlinted)
- Move lint/format scripts to the repo root (single binary covers the
  whole monorepo); drop per-package lint/format scripts
- Update husky pre-commit to run npm run check
- Apply Biome's safe + unsafe auto-fixes across the repo: node: import
  protocol, parseInt radix, Number.isNaN, optional chains, Date.now()

Assisted-by: Claude Opus 4.7 via Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

Replaces ESLint + Prettier with a single Biome 2.4.12 toolchain across the monorepo, updating the pre-commit hook and applying safe/unsafe auto-fixes (import reordering, node: protocol, explicit parseInt radix, Number.isNaN, optional chaining, Date.now()). All applied fixes are semantically equivalent to the originals.

Confidence Score: 5/5

Safe to merge — all code changes are mechanical, semantics-preserving auto-fixes with no logic alterations.

The only finding is a P2 DX note about check:fix not applying unsafe fixes; no functional, correctness, or security issues were found.

No files require special attention.

Important Files Changed

Filename Overview
biome.json New Biome 2.4.12 config replacing ESLint + Prettier; rule placements verified correct for v2 (noVar moved to suspicious group in Biome 2.0), formatter mirrors previous Prettier settings
package.json Replaces per-workspace lint/format scripts with single root-level Biome commands; drops eslint, typescript-eslint, prettier; adds @biomejs/biome; adds check and check:fix scripts
.husky/pre-commit Simplified to single npm run check; removal of husky.sh sourcing is correct for Husky v9
shared/http-client.ts Import reordering; parseInt gains explicit radix 10; optional chaining applied to content-type check — all semantically equivalent
packages/storage/src/lib/object/put.ts Optional chaining applied to contentDisposition; leavePartsOnError simplified with logical negation — both semantically equivalent
packages/keyv-tigris/src/lib/keyv-tigris.ts EventEmitter moved to node: protocol; eslint-disable comment replaced with _ttl underscore convention for unused parameter
packages/storage/src/server.ts Type-first export reordering and type-only import annotations applied throughout; no API surface changes

Reviews (1): Last reviewed commit: "chore(storage): update packages" | Re-trigger Greptile

Comment thread package.json
"format": "biome format --write",
"format:check": "biome format",
"check": "biome check",
"check:fix": "biome check --write",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 check:fix won't auto-fix noVar violations

biome check --write only applies safe fixes. The suspicious/noVar rule (and a handful of others enabled here) carry an unsafe fix in Biome 2.x, so running check:fix will still report noVar errors without auto-correcting them. Developers may find this confusing. Consider adding a separate check:fix:unsafe script, or documenting that --unsafe is required to auto-fix those rules.

Suggested change
"check:fix": "biome check --write",
"check:fix": "biome check --write --unsafe",

@designcode designcode merged commit f25879b into main Apr 23, 2026
2 checks passed
@designcode designcode deleted the chore/replace-eslint-with-biome branch April 23, 2026 08:59
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.

2 participants