Skip to content

Web: Migrate from Prettier + ESLint to Ultracite + Biome - #94

Merged
wasimxyz merged 9 commits into
stagingfrom
cursor/migrate-web-to-ultracite-biome
Jun 23, 2026
Merged

Web: Migrate from Prettier + ESLint to Ultracite + Biome#94
wasimxyz merged 9 commits into
stagingfrom
cursor/migrate-web-to-ultracite-biome

Conversation

@wasimxyz

@wasimxyz wasimxyz commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Migrates the web/ toolchain from Prettier + ESLint to Ultracite + Biome, and resolves every resulting lint/type violation so the check is green.

Toolchain swap

  • Adds web/biome.jsonc (extends ultracite/biome/core + react + next) and web/.vscode/settings.json. The preset reproduces the prior style (2-space indent, double quotes, es5 trailing commas, 80-col width) plus import organizing and Tailwind class sorting, with a small set of linter.rules overrides for rules we intentionally disable and an override turning linting off for generated components/ui/**.
  • Removes eslint.config.mjs, .prettierrc, .prettierignore and the ESLint/Prettier devDependencies; regenerates package-lock.json.
  • Rewires web/package.json scripts: lint:check (ultracite check), lint:fix (ultracite fix); check and precommit run lint + typecheck.
  • Wires CI and the Makefile: the typescript-lint workflow drops the Prettier format:check step and runs lint:check (Biome's combined formatter + linter); make fe-format/fe-lint point at lint:fix/lint:check.

Lint + type cleanup

  • Applies Biome's formatting and safe autofixes across the web/ tree (~296 files).
  • Resolves the remaining violations by hand and the type errors they surfaced — e.g. useAwait (await returned thenables, or drop a needless async), useConsistentTypeDefinitions (type object aliases → interface), plus assorted noNonNullAssertion, noNestedTernary, noArrayIndexKey, etc. lint:check and typecheck are now clean.
  • biome check --write --unsafe was deliberately not run — its fixes can change runtime behavior (e.g. stripping intentional hook dependencies) — so any unsafe suggestions were reviewed and applied individually.

Incidental refactor

  • Splits the pure archive retry-estimate (estimateRetryAfterSeconds + its constants) into web/lib/api/archive-retry.ts so its unit test no longer transitively imports @/lib/db, which throws at import time when DATABASE_URL is unset (the no-Postgres unit/MCP vitest suite).

Replace the Prettier + ESLint toolchain with Ultracite + Biome. Adds
biome.jsonc (extends ultracite core/react/next presets) and editor
settings, removes the ESLint/Prettier configs and devDependencies, and
rewires the lint/format scripts. Applies Biome's safe autofixes across
the app; remaining lint violations are addressed in follow-up commits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
data-hub Ready Ready Preview, Comment Jun 23, 2026 12:26am

Request Review

@wasimxyz wasimxyz changed the title web: migrate from Prettier + ESLint to Ultracite + Biome Web: Migrate from Prettier + ESLint to Ultracite + Biome Jun 22, 2026
@wasimxyz wasimxyz self-assigned this Jun 22, 2026
Rename the lint scripts to lint:check (ultracite check) and lint:fix
(ultracite fix) and point the typescript-lint workflow and the
fe-format/fe-lint Make targets at them, dropping the obsolete
Prettier format:check CI step.

Co-authored-by: Cursor <cursoragent@cursor.com>
wasimxyz and others added 5 commits June 22, 2026 16:24
Convert object types to interfaces, replace global isNaN with Number.isNaN,
and disable useTopLevelRegex and noExcessiveCognitiveComplexity.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove non-null assertions, apply remaining autofixes, and disable selected
a11y, complexity, and style rules that do not fit this codebase.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove non-null assertions, add switch defaults and stable React keys,
and fix type errors from optional-chaining replacements.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add config disables, inline ignores for intentional patterns, remove the
runs-table metadata barrel, and fix switch defaults and label associations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve Biome `useAwait` violations by awaiting returned thenables or
dropping `async` where nothing is awaited, and convert flagged object
type aliases to interfaces. Split the pure archive retry-estimate into
`lib/api/archive-retry.ts` so the unit test no longer imports `@/lib/db`
(which throws at import when DATABASE_URL is unset).

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace Prettier/ESLint and old script names (lint, format, format:check)
with the Biome/Ultracite commands (lint:check, lint:fix) across the web
README, getting-started, conventions, CI, and AGENTS docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wasimxyz
wasimxyz merged commit 55c2400 into staging Jun 23, 2026
6 checks passed
@wasimxyz
wasimxyz deleted the cursor/migrate-web-to-ultracite-biome branch June 23, 2026 00:29
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