镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Replace Prettier and ESLint with Biome as formatter and linter - #5

Open
jamesrweb wants to merge 4 commits into
mainfrom
chore/biome-formatter-migration
Open

jamesrweb wants to merge 4 commits into
mainfrom
chore/biome-formatter-migration

Conversation

@jamesrweb

Copy link
Copy Markdown
Member

Related Issue

Fixes N / A

PR Type

  • 🐛 Bug Fix
  • ✨ New Feature
  • 🔨 Code Refactor
  • 📝 Documentation Update
  • 🧪 Test Update
  • 🔧 Build/CI Update
  • 🧹 Chore
  • ⏪ Revert

Description

Replaces Prettier and ESLint with Biome as the sole formatter and linter, aligning
this repository with the organisation-wide standard. A root biome.json now
carries the shared rules (2-space indent, double quotes, semicolons,
proseWrap: "always", organizeImports on, linter recommended preset plus
useBlockStatements: "error"), with "$schema" pointing at
./node_modules/@biomejs/biome/configuration_schema.json so it always tracks
the installed Biome version. A follow-up commit refreshes dev dependencies via
npm-check-updates and regenerates the lock file, keeping typescript on the
latest 6.x.x exact pin.

Proposed Changes

  • Add root biome.json (org base rules, version-tracking $schema)
  • package.json: format is now biome check --write ., lint is
    biome check .; removed format:check, lint:fix, and the prettier
    helper script; integrate is now pnpm lint && pnpm test && pnpm build
  • Remove prettier, @trivago/prettier-plugin-sort-imports, and the ESLint
    toolchain from devDependencies; add @biomejs/biome@2.6.4
  • Delete config/prettier/ and config/eslint/
  • CI: the format job now runs pnpm lint
  • Update AGENTS.md and README.md (commands tables, formatting/linting
    sections, file tree)
  • Fix Biome lint finding: instanceof Array → Array.isArray in
    logErrorBoundaryError
  • Follow-up commit: ncu -u plus lock file regeneration (typescript held at
    6.0.3, packageManager bumped to pnpm@12.16.1)

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Testing (please describe)

Ran the full local pipeline: pnpm format, pnpm lint (exit 0, no warnings),
pnpm test (16/16 passing), pnpm build (exit 0).

Screenshots/Recordings

Breaking Changes

  • Yes (please describe)
  • No

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • My changes generate no new warnings

Additional Notes

No public API changes — everything exported from src/main.ts is untouched.
Biome reformats a number of source files in this PR; that is the expected
formatting migration, not a behavioural change.

Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>
Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>
@jamesrweb
jamesrweb requested a review from yevdyko as a code owner November 2, 2026 00:58
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Coverage report for commit: b4cac6b
File: ./coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ██░░░░░░░░░░░░░░░░░░░░░ │  6.3%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
 100% │ ███████████████████████ │ 93.8%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution / ▒ = Previous Distribution
Summary - Lines: 70.59% ⏹️ | Methods: 100.00% ⏹️ | Branches: 44.44% ⏹️
FilesLinesMethodsBranches
src/constants
   CanvasContainerClassName.ts100.00%100.00%100.00%
src/contracts
   CanvasContainer.ts100.00%100.00%100.00%
   CanvasContainerRef.ts100.00%100.00%100.00%
   P5CanvasInstance.ts100.00%100.00%100.00%
   P5CanvasInstanceRef.ts100.00%100.00%100.00%
   P5CanvasProps.ts100.00%100.00%100.00%
   Sketch.ts100.00%100.00%100.00%
   SketchProps.ts100.00%100.00%100.00%
   Updater.ts100.00%100.00%100.00%
   p5.ts100.00%100.00%100.00%
src
   main.ts100.00%100.00%100.00%
src/utils
   createP5CanvasInstance.ts100.00%100.00%100.00%
   logErrorBoundaryError.ts58.33%100.00%37.50%
   propsAreEqual.ts100.00%100.00%100.00%
   removeP5CanvasInstance.ts100.00%100.00%100.00%
   updateP5CanvasInstance.ts100.00%100.00%100.00%

🤖 comment via lucassabreu/comment-coverage-clover

Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>
@jamesrweb jamesrweb self-assigned this Nov 2, 2026
@jamesrweb jamesrweb added dependencies Issues with or changes to dependencies documentation Improvements or additions to documentation enhancement New feature or request labels Nov 2, 2026
Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Issues with or changes to dependencies documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant