Skip to content

chore: better biome setup - #20

Merged
jamesbhobbs merged 6 commits into
mainfrom
lint-reconfig
Oct 2, 2025
Merged

jamesbhobbs merged 6 commits into
mainfrom
lint-reconfig

Conversation

@jamesbhobbs

@jamesbhobbs jamesbhobbs commented Oct 2, 2025 •

Copy link
Copy Markdown
Member

Fixes partially #8

Summary by CodeRabbit

  • Chores
    • Expanded linting into comprehensive groups (accessibility, correctness, performance, security, style) for safer, more consistent code.
    • Introduced stricter checks for unused/unsafe patterns to reduce bugs and improve maintainability.
    • Updated developer tooling and pre-commit hooks to use combined lint+format workflows with autofix and formatting via Prettier.
    • Consolidated CI to run a unified lint-and-format job, streamlining checks without changing user-facing behavior.

@coderabbitai

coderabbitai Bot commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@jamesbhobbs has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1419349 and 504e573.

📒 Files selected for processing (1)
  • package.json (1 hunks)
📝 Walkthrough

Walkthrough

The PR replaces a single disabled suspicious.noExplicitAny rule with a full biome.json lint configuration grouped into: a11y, complexity, correctness, performance, security, style, and suspicious. Many rules now include explicit severities and new checks (examples: noBannedTypes, noUnusedImports, noUnusedFunctionParameters, useHookAtTopLevel, noNonNullAssertion, useConst, noEmptyInterface, noConsole: warn, noDebugger). package.json adds biome:check, biome:check:fix, lintAndFormat/lintAndFormat:fix, prettier/prettier:check, updates lint-staged patterns/commands. CI consolidates lint and format into a single "Lint & Format" job running the combined script.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (local)
    participant GH as Git Hook (lint-staged)
    participant BI as Biome (lint)
    participant PR as Prettier (md/yml)
    participant CI as CI ("Lint & Format" job)

    Dev->>GH: Commit / push (staged files)
    GH->>BI: Run `pnpm exec biome` on **/*.{js,ts,jsx,tsx,html,json,jsonc} (--write for fixes)
    GH->>PR: Run `pnpm run prettier` on **/*.{md,yml,yaml}
    BI-->>GH: Lint fixes/results
    PR-->>GH: Format results
    GH-->>Dev: Hook exit (allow/abort)

    Note right of CI: On PR/merge
    CI->>CI: Run `pnpm run lintAndFormat`
    CI->>BI: biome:check
    CI->>PR: prettier:check
    BI-->>CI: Lint result (pass/fail)
    PR-->>CI: Format check (pass/fail)
Loading

Possibly related PRs

  • deepnote/deepnote#18473: Modifies Biome configuration and package.json lint/format scripts (direct overlap in biome.json and scripts).
  • deepnote/deepnote#18493: Changes Biome/formatting config during ESLint→Biome migration (related rule and tooling adjustments).
  • deepnote/deepnote#18475: Updates Biome and lint-staged/CI hooks (overlaps in lint-staged and CI changes).

Suggested reviewers

  • Artmann
  • saltenasl

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 concisely indicates that this chore improves the project’s Biome setup and aligns with the expanded lint rules and related script updates. It avoids unnecessary detail while capturing the main focus of the changeset. This phrasing is clear and directly tied to the substantial Biome configuration overhaul.
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

codecov Bot commented Oct 2, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f11b52e) to head (504e573).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            3         3           
  Branches         1         1           
=========================================
  Hits             3         3           

☔ 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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 2, 2025
Comment thread package.json
"format": "biome format --write .",
"format:check": "biome format .",
"license-check": "license-checker-rseidelsohn --json --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC\" --excludePackages \"deepnote\"",
"lint": "biome lint .",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

biome is so fast I see no virtue in keeping the conventional lint and format scripts. If we want them shouldn't they just run all biome checks and writes?

@jamesbhobbs
jamesbhobbs marked this pull request as ready for review October 2, 2025 15:11
@jamesbhobbs
jamesbhobbs requested a review from saltenasl as a code owner October 2, 2025 15:11
@jamesbhobbs
jamesbhobbs requested review from Artmann and tkislan October 2, 2025 15:11

@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 ed27143 and aef5fd0.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml (2 hunks)
  • package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 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
📚 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: Pre-commit: run `npm run format-fix`, `npm run lint`, and `npm run test:unittests` before committing

Applied to files:

  • .github/workflows/ci.yml
📚 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 lint` to check for linter issues

Applied to files:

  • .github/workflows/ci.yml

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 aef5fd0 and 1419349.

📒 Files selected for processing (1)
  • package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 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

Comment thread package.json Resolved
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