-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add biome formatter configuration #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
📝 WalkthroughWalkthroughThis 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
Pre-merge checks✅ Passed checks (3 passed)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
📒 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
.editorconfigsupport 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
| "attributePosition": "auto", | ||
| "bracketSameLine": false, | ||
| "bracketSpacing": true, |
There was a problem hiding this comment.
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.
|
I've decided not to do this and instead to try to improve the tardy eslint implementation as I've found important problems. |
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/deepnoteOSS repository to maintain consistency across Deepnote projects.What's included:
biome.jsonwith formatter-only settings (no linting rules).editorconfigfiles if presentpackage.json,coverage, anddistfrom formattingReview & Testing Checklist for Human
Notes
npm install -D @biomejs/biome)biome.jsonfile itself was formatted with Prettier to pass CI checksNotebookPicker.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