Skip to content

chore: Set up Biome for linting and formatting. - #9

Merged
Artmann merged 1 commit into
mainfrom
chris/add-biome
Oct 1, 2025
Merged

Artmann merged 1 commit into
mainfrom
chris/add-biome

Conversation

@Artmann

@Artmann Artmann commented Oct 1, 2025 •

Copy link
Copy Markdown
Contributor

Replaces Prettier with Biome, which we can use for both formatting and linting.

Fixes #8

Summary by CodeRabbit

  • CI
    • Added a dedicated lint job to CI and clarified step titles for spell-check and formatter.
  • Documentation
    • Updated contributing guidance to use Biome and added editor integration links.
  • Style
    • Introduced Biome-based formatting/linting rules (2-space, 120-char width, LF, JSX preferences) and added a project Biome config.
  • Chores
    • Replaced Prettier with Biome in tooling and scripts, removed Prettier config/ignore entries, added lint-staged hooks, license, and metadata.

@coderabbitai

coderabbitai Bot commented Oct 1, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds Biome as the project's formatter and linter (new biome.json, @biomejs/biome in devDependencies, updated package.json scripts and lint-staged), removes Prettier config and many .prettierignore entries, updates CONTRIBUTING.md to reference Biome and editor integrations, and updates CI (.github/workflows/ci.yml) to add a new "Lint" job (checks out code, sets up pnpm/Node from .nvmrc, installs deps, runs pnpm run lint). Also renames two CI step labels (“Run spell check” → “Run the spell check”, “Run formatter” → “Run the formatter”).

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (local)
    participant Git as Git / pre-commit
    participant LintStaged as lint-staged
    participant Biome as Biome (local)
    participant CI as CI runner

    Note over Dev,Git: Local commit-time flow (changed)
    Dev->>Git: Commit
    Git->>LintStaged: pre-commit hook triggers
    LintStaged->>Biome: pnpm exec biome format --write (matched files)
    LintStaged->>Biome: (optionally) pnpm run lint:fix

    Note over CI: Remote CI lint job (new)
    CI->>CI: Checkout & setup Node (.nvmrc) + pnpm
    CI->>CI: pnpm install
    CI->>Biome: pnpm run lint
    CI-->>CI: Lint job success / failure
Loading
sequenceDiagram
    participant Old as Old flow (Prettier)
    participant New as New flow (Biome)
    participant Maintainer as Maintainer

    Note over Old,New: Tooling replacement (conceptual)
    Maintainer->>Old: pnpm format / format:check (prettier)
    Old--xMaintainer: removed

    Maintainer->>New: pnpm format / format:check (biome)
    New-->>Maintainer: formatted / check result
Loading

Possibly related PRs

  • deepnote/deepnote#18473 — modifies biome.json and package.json to add/adjust Biome configuration and scripts; strong overlap with this PR.
  • deepnote/deepnote#18475 — updates biome.json assist.organizeImports and Biome-related scripts; overlaps on Biome configuration and scripts.
  • deepnote/deepnote-internal#18561 — adjusts biome.json files/includes patterns; directly related to the new biome.json introduced here.

Suggested reviewers

  • jamesbhobbs
  • OlegWock

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning While most of the changes align with the goal of migrating linting and formatting to Biome, the addition of a top-level license field and project keywords in package.json fall outside the scope of issue #8, which focused solely on selecting and configuring a linting tool. These metadata updates are unrelated to the lint configuration objective and could be separated into a distinct pull request. Consider extracting the license and metadata additions into a separate pull request so that this change remains focused on configuring Biome for linting and formatting.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly reflects the primary purpose of this pull request, which is to set up Biome for both linting and formatting by adding the Biome configuration, updating CI steps, and replacing Prettier tooling. It is concise, specific, and follows a conventional commit style that clearly conveys the main focus without unnecessary detail.
Linked Issues Check ✅ Passed This pull request directly addresses issue #8 by selecting Biome as the primary linting configuration and implementing it through the addition of a biome.json file, updates to package.json scripts, modifications to the CI workflow, and revisions to documentation. It removes Prettier-specific configurations and replaces them with Biome tooling, thereby fulfilling the requirement to decide on and adopt a single linting solution.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8af5f0 and 55667f3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/workflows/ci.yml (2 hunks)
  • .prettierignore (0 hunks)
  • .prettierrc (0 hunks)
  • CONTRIBUTING.md (2 hunks)
  • biome.json (1 hunks)
  • package.json (1 hunks)
💤 Files with no reviewable changes (2)
  • .prettierignore
  • .prettierrc
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: FilipPyrek
PR: deepnote/deepnote#18531
File: biome.json:58-58
Timestamp: 2025-09-25T14:43:13.976Z
Learning: Biome is a JavaScript/TypeScript linter and formatter that doesn't process .proto files, so Protocol Buffer source files don't need to be explicitly ignored in biome.json configuration.
📚 Learning: 2025-09-25T14:43:13.976Z
Learnt from: FilipPyrek
PR: deepnote/deepnote#18531
File: biome.json:58-58
Timestamp: 2025-09-25T14:43:13.976Z
Learning: Biome is a JavaScript/TypeScript linter and formatter that doesn't process .proto files, so Protocol Buffer source files don't need to be explicitly ignored in biome.json configuration.

Applied to files:

  • CONTRIBUTING.md
  • biome.json
📚 Learning: 2025-09-03T12:53:28.421Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-03T12:53:28.421Z
Learning: Use lint/format tools as part of development

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format` to check code style

Applied to files:

  • CONTRIBUTING.md
  • .github/workflows/ci.yml
📚 Learning: 2025-09-03T12:53:28.421Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-03T12:53:28.421Z
Learning: Run `npm run format-fix` before committing any changes

Applied to files:

  • package.json
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: ALWAYS run `npm run format-fix` before committing changes

Applied to files:

  • package.json
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format-fix` to auto-fix formatting issues

Applied to files:

  • .github/workflows/ci.yml
🔇 Additional comments (4)
.github/workflows/ci.yml (1)

58-79: Nice addition of the lint job.

Wiring matches the other jobs and covers the new Biome lint script cleanly.

CONTRIBUTING.md (1)

65-78: Docs now line up with the tooling.

Calling out Biome plus the editor links keeps the instructions accurate.

biome.json (1)

1-48: Config looks solid.

VCS ignore wiring and the formatter/linter settings are consistent with repo needs.

package.json (1)

13-30: Script and lint-staged updates align well.

Explicit . targets fix the CLI behaviour and lint-staged now scopes writes to staged files only.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26eca29 and 7138b88.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/workflows/ci.yml (2 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc (1 hunks)
  • CONTRIBUTING.md (2 hunks)
  • biome.json (1 hunks)
  • package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format` to check code style

Applied to files:

  • .github/workflows/ci.yml
  • CONTRIBUTING.md
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format-fix` to auto-fix formatting issues

Applied to files:

  • .github/workflows/ci.yml
📚 Learning: 2025-09-25T14:43:13.976Z
Learnt from: FilipPyrek
PR: deepnote/deepnote#18531
File: biome.json:58-58
Timestamp: 2025-09-25T14:43:13.976Z
Learning: Biome is a JavaScript/TypeScript linter and formatter that doesn't process .proto files, so Protocol Buffer source files don't need to be explicitly ignored in biome.json configuration.

Applied to files:

  • CONTRIBUTING.md
  • biome.json
📚 Learning: 2025-09-03T12:53:28.421Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-03T12:53:28.421Z
Learning: Use lint/format tools as part of development

Applied to files:

  • CONTRIBUTING.md

Comment thread .prettierignore Resolved
Comment thread biome.json Resolved
Comment thread package.json Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7138b88 and f8af5f0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/workflows/ci.yml (2 hunks)
  • .prettierignore (0 hunks)
  • .prettierrc (0 hunks)
  • CONTRIBUTING.md (2 hunks)
  • biome.json (1 hunks)
  • package.json (1 hunks)
💤 Files with no reviewable changes (2)
  • .prettierrc
  • .prettierignore
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: FilipPyrek
PR: deepnote/deepnote#18531
File: biome.json:58-58
Timestamp: 2025-09-25T14:43:13.976Z
Learning: Biome is a JavaScript/TypeScript linter and formatter that doesn't process .proto files, so Protocol Buffer source files don't need to be explicitly ignored in biome.json configuration.
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format` to check code style

Applied to files:

  • .github/workflows/ci.yml
  • CONTRIBUTING.md
📚 Learning: 2025-09-03T13:01:49.096Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-09-03T13:01:49.096Z
Learning: Use `npm run format-fix` to auto-fix formatting issues

Applied to files:

  • .github/workflows/ci.yml
📚 Learning: 2025-09-25T14:43:13.976Z
Learnt from: FilipPyrek
PR: deepnote/deepnote#18531
File: biome.json:58-58
Timestamp: 2025-09-25T14:43:13.976Z
Learning: Biome is a JavaScript/TypeScript linter and formatter that doesn't process .proto files, so Protocol Buffer source files don't need to be explicitly ignored in biome.json configuration.

Applied to files:

  • biome.json
  • CONTRIBUTING.md
📚 Learning: 2025-09-03T12:53:28.421Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-03T12:53:28.421Z
Learning: Use lint/format tools as part of development

Applied to files:

  • CONTRIBUTING.md

Comment thread package.json Resolved
@Artmann
Artmann marked this pull request as draft October 1, 2025 10:09
@Artmann
Artmann marked this pull request as ready for review October 1, 2025 10:15
@Artmann
Artmann requested a review from andyjakubowski October 1, 2025 10:18
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.

Decide on linting configuration: ESLint, Biome, or blend

2 participants