Skip to content

Conversation

@jamesbhobbs
Copy link
Contributor

@jamesbhobbs jamesbhobbs commented Oct 21, 2025

chore: add biome formatter configuration

Summary

Adds Biome formatter configuration file to enable opt-in usage of Biome as an alternative to Prettier. This is a configuration-only change that does not install Biome as a dependency or integrate it into the build/CI process.

Configuration copied from deepnote/deepnote OSS repository to maintain consistency across Deepnote projects.

What's included:

  • biome.json with formatter-only settings (no linting rules)
  • 2-space indentation, 120 character line width
  • Single quotes, semicolons as needed
  • Respects .editorconfig files if present
  • Excludes package.json, coverage, and dist from formatting

Review & Testing Checklist for Human

  • Verify formatter settings - Confirm line width (120), indentation (2 spaces), and quote style (single) match project standards
  • Confirm approach - This PR intentionally does NOT install Biome or integrate it into npm scripts/CI. Is this the desired behavior, or should we do a full integration?

Notes

  • Existing Prettier + ESLint setup remains unchanged and continues to be enforced by CI
  • Developers who want to use Biome will need to install it separately (npm install -D @biomejs/biome)
  • The biome.json file itself was formatted with Prettier to pass CI checks
  • CI Status: There's a pre-existing test failure in NotebookPicker.spec.ts (unrelated to this change). All other checks pass.

Link to Devin run: https://app.devin.ai/sessions/df9fb4f9ff664ab28848f60fedcb2877
Requested by: James Hobbs ([email protected]) / @jamesbhobbs

Summary by CodeRabbit

  • Chores
    • Added code formatting and linting configuration with settings for indentation, line endings, line width, JSX formatting, trailing commas, semicolons, arrow function parentheses, bracket spacing, and HTML void element handling.

@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

📝 Walkthrough

Walkthrough

This PR adds a biome.json configuration file to the repository, establishing formatting and linting defaults for the Biome tool. The configuration specifies VCS handling, file inclusion patterns, formatter settings (indentation, line endings, line width), and JavaScript/JSX-specific rules (quotes, semicolons, trailing commas, spacing). HTML formatting is configured to consistently self-close void elements.

Possibly related PRs

Suggested reviewers

  • saltenasl
  • Artmann
  • andyjakubowski

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: add biome formatter configuration" directly and accurately describes the primary change: adding a biome.json configuration file for the Biome formatter. It is concise, uses appropriate commit convention, and clearly conveys what was done without vague language or unnecessary detail. A teammate scanning the git history would immediately understand this is a formatter configuration addition.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.20%. Comparing base (125f95d) to head (79a41ab).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   50.20%   50.20%           
=======================================
  Files          13       13           
  Lines         249      249           
  Branches       26       26           
=======================================
  Hits          125      125           
  Misses        119      119           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 125f95d and 79a41ab.

📒 Files selected for processing (1)
  • biome.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: deepnote/deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-14T13:43:36.364Z
Learning: Applies to **/*.{ts,tsx} : Follow Biome's lint rules as configured in biome.json
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:

  • biome.json
📚 Learning: 2025-10-14T13:43:36.364Z
Learnt from: CR
PR: deepnote/deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-14T13:43:36.364Z
Learning: Applies to **/*.{ts,tsx} : Follow Biome's lint rules as configured in biome.json

Applied to files:

  • biome.json
🔇 Additional comments (2)
biome.json (2)

1-32: Configuration is sound and aligned with PR objectives.

The formatter-only setup respects the existing Prettier + ESLint pipeline while enabling opt-in Biome use. VCS integration (git + .gitignore) and .editorconfig support are well-configured. Exclusion patterns appropriately skip build artifacts and dependency manifests.


2-2: Update biome.json schema to latest version 2.2.6.

The schema version 2.2.5 references an older stable release. The latest stable Biome version is 2.2.6, released October 13, 2025. Update the schema URL to reflect the current version:

  "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
⛔ Skipped due to learnings
Learnt from: jamesbhobbs
PR: deepnote/deepnote#0
File: :0-0
Timestamp: 2025-10-23T10:51:21.086Z
Learning: When biomejs/biome is updated in package.json, the $schema field in biome.json must be updated to match the new version using the pattern: https://biomejs.dev/schemas/{VERSION}/schema.json

Comment on lines +12 to +14
"attributePosition": "auto",
"bracketSameLine": false,
"bracketSpacing": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Minor redundancy: formatter settings repeated across sections.

bracketSameLine, bracketSpacing, and attributePosition appear in both general formatter and JavaScript-specific sections. While functionally correct (nested settings override), consolidating to the JavaScript section would reduce verbosity.

 "formatter": {
   "enabled": true,
   "formatWithErrors": false,
   "indentStyle": "space",
   "indentWidth": 2,
   "lineEnding": "lf",
   "lineWidth": 120,
-  "attributePosition": "auto",
-  "bracketSameLine": false,
-  "bracketSpacing": true,
   "expand": "auto",
   "useEditorconfig": true,
   "includes": ["**", "!./coverage", "!./dist", "!**/package.json"]
 },
 "javascript": {
   "formatter": {
     "jsxQuoteStyle": "single",
     "quoteProperties": "preserve",
     "trailingCommas": "es5",
     "semicolons": "asNeeded",
     "arrowParentheses": "asNeeded",
     "bracketSameLine": false,
     "quoteStyle": "single",
     "attributePosition": "auto",
     "bracketSpacing": true
   }
 }

Also applies to: 28-29

🤖 Prompt for AI Agents
In biome.json around lines 12-14 (and similarly lines 28-29), you have
duplicated formatter settings (attributePosition, bracketSameLine,
bracketSpacing) in both general and JavaScript-specific sections; remove these
keys from the general section and keep them only in the JavaScript-specific
section so the JS overrides remain intact and the file is less verbose, ensuring
no other references rely on the general keys before deleting.

@jamesbhobbs
Copy link
Contributor Author

I've decided not to do this and instead to try to improve the tardy eslint implementation as I've found important problems.

@jamesbhobbs jamesbhobbs deleted the devin/1761062859-add-biome-formatter branch October 23, 2025 17:15
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.

2 participants