Skip to content

chore: migrate from eslint and prettier to biome - #14

Merged
Upd4ting merged 3 commits into
mainfrom
chore/migrate-to-biome
Mar 7, 2026
Merged

chore: migrate from eslint and prettier to biome#14
Upd4ting merged 3 commits into
mainfrom
chore/migrate-to-biome

Conversation

@Upd4ting

@Upd4ting Upd4ting commented Mar 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace ESLint + Prettier with Biome for linting and formatting
  • Remove eslint.config.mjs, .prettierrc.json, and related devDependencies (eslint, prettier, typescript-eslint, globals, etc.)
  • Add biome.json configuration and @biomejs/biome devDependency
  • Update package.json scripts (lint, lint:fix, format) to use Biome
  • Update .editorconfig to use 2-space indentation
  • Reformat all source files with Biome (double quotes, trailing commas, line width)

Test plan

  • Run pnpm lint to verify Biome check passes
  • Run pnpm format to verify Biome formatting works
  • Run pnpm test to verify no regressions from reformatting
  • Verify pnpm build still produces correct output

Greptile Summary

This PR migrates the project's tooling from ESLint + Prettier to Biome for linting and formatting. All source files are reformatted consistently (double quotes, 2-space indent, trailing commas, line-width wrapping, node: import prefixes), configuration files for the old tools are removed, and package.json scripts and devDependencies are updated accordingly.

Key observations:

  • Functional change in src/index.ts: await was added to ImplementInterface(...) to satisfy Biome's noFloatingPromises rule. This is a real behavioral change — the original code had a floating promise that would have swallowed rejections. This bug fix is not called out in the PR description.
  • Nursery rule at error severity (biome.json): nursery.noFloatingPromises is experimental and subject to change/removal between Biome releases. Using "error" rather than "warn" risks unexpected CI failures on future Biome upgrades.
  • Lost ESLint rules without Biome equivalents: no-console, @typescript-eslint/no-misused-promises, and import/no-extraneous-dependencies are no longer enforced. These represent a minor reduction in static analysis coverage.
  • @biomejs/biome is pinned to an exact version (2.3.2) in both package.json and the $schema URL, which is good practice for reproducible builds.

Confidence Score: 4/5

  • This PR is safe to merge with minor caveats around a nursery rule at error severity and an undocumented functional fix.
  • The vast majority of changes are pure reformatting with no logic impact. The one genuine behavioral change (awaiting ImplementInterface) is actually a bug fix. The only real risks are the experimental nursery rule set to error severity and the loss of a few ESLint rules that have no Biome equivalents.
  • biome.json (nursery rule severity) and src/index.ts (undocumented functional change) warrant a quick look before merging.

Important Files Changed

Filename Overview
biome.json New Biome configuration file; nursery.noFloatingPromises is set to "error" which is risky since nursery rules are unstable and may change between Biome versions.
src/index.ts Reformatted to Biome style; also contains an undocumented functional change — await added to ImplementInterface(...), fixing a previously floating promise.
package.json Swaps ESLint/Prettier devDependencies for @biomejs/biome@2.3.2 (pinned, good for reproducibility) and updates lint, lint:fix, and format scripts accordingly.
src/jwt.ts Pure reformatting: double quotes, trailing commas, line-width wrapping, and node: protocol prefix on built-in imports. No logic changes.
src/interfaces/auth/beta/index.ts Pure reformatting: double quotes, trailing commas, function-signature wrapping, and node:http import prefix. No logic changes.
src/implementations/auth/beta.ts Pure reformatting: double quotes, trailing commas, and import type optimisations. No logic changes.
src/test/antelope.test.js Pure reformatting: double quotes, trailing commas, and arrow functions replacing named function expressions. No logic changes.
src/test/interfaces/auth/beta/index.test.ts Pure reformatting: double quotes, trailing commas, and import reordering. No logic changes to test assertions.
.editorconfig Indentation changed from tabs (4) to spaces (2) to match the new Biome formatter settings.
eslint.config.mjs Deleted as part of the ESLint removal; several rules (e.g. no-console, no-misused-promises, import/no-extraneous-dependencies) have no direct Biome equivalents.
pnpm-lock.yaml Lock file updated to reflect the removal of ESLint/Prettier packages and the addition of @biomejs/biome@2.3.2 with all its optional platform-specific CLI binaries.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Developer runs pnpm lint / pnpm format] --> B{Biome CLI}
    B --> C[Linter\nbiome check .]
    B --> D[Formatter\nbiome format --write .]
    C --> E{Rules Applied}
    E --> F[recommended rules\nstable]
    E --> G[suspicious.noExplicitAny\ndisabled]
    E --> H[nursery.noFloatingPromises\nerror ⚠️ experimental]
    D --> I[2-space indent\ndouble quotes\ntrailing commas\nline width 80]
    F --> J[Pass / Fail]
    G --> J
    H --> J
    I --> J
Loading

Comments Outside Diff (2)

  1. biome.json, line 70-72 (link)

    Nursery rule set to error severity

    Biome's nursery category contains experimental rules that are unstable and subject to change or removal between releases. Setting noFloatingPromises to "error" (as opposed to "warn") means that any breaking change to this rule in a future Biome update could unexpectedly break CI.

    Consider using "warn" until the rule graduates to a stable category, or at minimum, document this as an intentional decision so future maintainers understand the risk when upgrading Biome.

  2. src/index.ts, line 576-579 (link)

    Unannounced functional change mixed into formatting PR

    The addition of await before ImplementInterface(...) is a behavioral change, not just a reformatting. If ImplementInterface returns a Promise (which is what triggered Biome's noFloatingPromises rule), the original code had a floating promise — meaning any rejection from ImplementInterface would have been silently swallowed instead of propagating to the caller of construct().

    This is effectively a bug fix bundled into a purely cosmetic PR. It is worth explicitly calling this out in the PR description so reviewers and future readers of the git history are aware that this file contains a runtime behavior change, not only formatting.

Last reviewed commit: c4d654e

Antony Rizzitelli added 3 commits March 7, 2026 17:05
Replace ESLint + Prettier with Biome for linting and formatting.
Remove eslint.config.mjs, .prettierrc.json, and related devDependencies.
Add biome.json configuration and reformat codebase accordingly.
Update .editorconfig to use 2-space indentation.
@Upd4ting
Upd4ting merged commit ac23801 into main Mar 7, 2026
3 checks passed
@Upd4ting
Upd4ting deleted the chore/migrate-to-biome branch March 7, 2026 16:10
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