chore(shared): replace eslint and prettier with biome#88
Conversation
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 SummaryReplaces 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, Confidence Score: 5/5Safe 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
Reviews (1): Last reviewed commit: "chore(storage): update packages" | Re-trigger Greptile |
| "format": "biome format --write", | ||
| "format:check": "biome format", | ||
| "check": "biome check", | ||
| "check:fix": "biome check --write", |
There was a problem hiding this comment.
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.
| "check:fix": "biome check --write", | |
| "check:fix": "biome check --write --unsafe", |
Summary
eslint,@eslint/js,typescript-eslint, andprettierin favor of@biomejs/biome.npm run check.node:import protocol, explicitparseIntradix,Number.isNaN, optional chains,Date.now()).shared,keyv-tigris,react,agent-kit, andstorage.Biome config notes
es5trailing commas.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.a11ydisabled forpackages/react— the React package wasn't previously linted at all; can be revisited as intentional follow-up work.Test plan
npm run checkis cleannpm run buildsucceeds across all workspacesnpm testpasses (207 tests across all packages)🤖 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, removingeslint.config.jsand.prettierrc, and updating root scripts to usebiome lint/format/check(plus newcheck:fix).Updates the Husky pre-commit hook to run
npm run checkand drops per-package lint/format scripts (e.g.,agent-kit,iam) in favor of the root Biome workflow, with minor import ordering/tidying changes inagent-kitsources/tests.Refreshes dependencies and lockfile (adds
@biomejs/biome, removes ESLint/Prettier/TypeScript-ESLint, bumpsvitestand 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.