Skip to content

chore: add additional Biome rules from deepnote-internal config - #49

Merged
jamesbhobbs merged 3 commits into
mainfrom
devin/1760727831-add-biome-rules-from-internal
Oct 17, 2025
Merged

jamesbhobbs merged 3 commits into
mainfrom
devin/1760727831-add-biome-rules-from-internal

Conversation

@jamesbhobbs

@jamesbhobbs jamesbhobbs commented Oct 17, 2025 •

Copy link
Copy Markdown
Member

chore: add additional Biome rules from deepnote-internal config

Summary

This PR synchronizes Biome linting rules from the deepnote-internal repository to the deepnote repository by adding explicitly-enabled rules that were missing. The changes add 39 explicit rule configurations across 5 categories:

  • complexity (6 rules): noCommaOperator, noStaticOnlyClass, noUselessConstructor, noUselessEmptyExport, noUselessThisAlias, useOptionalChain
  • correctness (8 rules): noConstAssign, noGlobalObjectCalls, noInnerDeclarations, noInvalidUseBeforeDeclaration, noInvalidBuiltinInstantiation, noUnreachableSuper, noUnsafeOptionalChaining, noUnusedLabels
  • style (8 rules): noNamespace, noParameterAssign, useAsConstAssertion, useConsistentMemberAccessibility (with noPublic option), useShorthandFunctionType, useExportType, useLiteralEnumMembers, useUnifiedTypeSignatures
  • suspicious (13 rules): noConfusingVoidType, noDuplicateClassMembers, noDuplicateObjectKeys, noDuplicateParameters, noExtraNonNullAssertion, noFunctionAssign, noLabelVar, noMisleadingInstantiator, noRedeclare, noUnsafeDeclarationMerging, noUnsafeNegation, useAdjacentOverloadSignatures, useNamespaceKeyword
  • nursery (4 rules - new section): noFloatingPromises, noMisusedPromises, noNonNullAssertedOptionalChain, useConsistentTypeDefinitions

Additionally, added "Instantiator" to the spell check dictionary to fix the CI spell check failure.

All existing code passes the new rules (verified via pnpm lintAndFormat, pnpm typecheck, and pnpm test locally, plus all CI checks).

Review & Testing Checklist for Human

  • Verify nursery rules are acceptable: The nursery section contains 4 experimental rules that may change in future Biome versions. Confirm these align with team standards and won't cause issues with future Biome upgrades.
  • Check for redundancy with recommended preset: Since this repo has "recommended": true, some of these rules might already be enabled by default. Verify whether explicit listing is preferred or if we should only list non-recommended rules.
  • Review useConsistentMemberAccessibility config: This rule has a special option "accessibility": "noPublic" - confirm this matches team preferences for TypeScript class member visibility.

Notes

  • Only rules that were explicitly set to "error" in deepnote-internal were added
  • The direction was one-way: deepnote-internal → deepnote (as requested)
  • No code changes were needed; all existing code already complies with these rules
  • Two commits: initial rule additions + spell check dictionary fix

Session: https://app.devin.ai/sessions/b81828a0d5a54dbf8956a5131fbb0b06
Requested by: James Hobbs (@jamesbhobbs)

@devin-ai-integration

Copy link
Copy Markdown

🤖 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

coderabbitai Bot commented Oct 17, 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 5 minutes and 3 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 fbbe72b and 741e26c.

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

Walkthrough

This PR expands the Biome linting configuration by adding numerous lint rules across multiple categories. New rules are introduced in complexity (noCommaOperator, noStaticOnlyClass, noUselessConstructor, noUselessEmptyExport, noUselessThisAlias, useOptionalChain), correctness, performance/style, and suspicious blocks. Additionally, a new nursery block is created containing experimental rules like noFloatingPromises and noMisusedPromises. The configuration updates TypeScript and JavaScript code quality enforcement standards.

Possibly related PRs

  • deepnote/deepnote-internal#18674: Migrates the same set of TypeScript-eslint rules (noUselessConstructor, noUselessThisAlias, noUselessEmptyExport, noMisleadingInstantiator, etc.) to Biome equivalents
  • deepnote/deepnote-internal#18697: Enables overlapping Biome suspicious and style rules (noExtraNonNullAssertion, noNamespace, useLiteralEnumMembers, useNamespaceKeyword)
  • chore: better biome setup #20: Makes overlapping, expansive changes to biome.json rule groups with many of the same new rules and category reorganizations

Suggested reviewers

  • saltenasl
  • Artmann
  • tkislan
  • andyjakubowski

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "chore: add additional Biome rules from deepnote-internal config" accurately describes the changeset, which adds 39 Biome linting rules across five categories to the biome.json file. It uses conventional commit format, is concise and specific, and clearly identifies both the action (adding rules) and the source (deepnote-internal config), making the intent immediately clear to someone reviewing history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

@codecov

codecov Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.91%. Comparing base (346b039) to head (741e26c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage   92.91%   92.91%           
=======================================
  Files          24       24           
  Lines         776      776           
  Branches      222      222           
=======================================
  Hits          721      721           
  Misses         55       55           

☔ 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 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 3fa9d61 and fbbe72b.

📒 Files selected for processing (1)
  • biome.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 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
🪛 GitHub Actions: CI
biome.json

[error] 94-94: Spell-check failed: Unknown word 'Instantiator' detected by cspell in biome.json. Please fix or add to dictionary.

🔇 Additional comments (5)
biome.json (5)

101-106: Verify that nursery rules are suitable for production enforcement.

The new nursery section introduces experimental Biome rules (noFloatingPromises, noMisusedPromises, noNonNullAssertedOptionalChain, useConsistentTypeDefinitions). These are typically less stable than stable rules. Confirm that your codebase is ready for these experimental rules and that they align with your team's standards, especially given their potential for false positives in async/promise handling code.


70-75: Confirm useConsistentMemberAccessibility option is applied correctly.

The useConsistentMemberAccessibility rule uses the "noPublic" accessibility option, which enforces that public access modifiers are omitted (TypeScript convention). Verify this matches your codebase and team conventions before merge.


26-50: Well-organized rule additions across complexity, correctness, and performance.

The 22 new rules in these sections are well-structured and consistent with existing patterns. All are set to "error" level and align with the PR objectives. Assuming all existing code passes these rules (as noted in the PR description), these changes improve code quality without breaking changes.


52-80: Style rules expanded consistently.

The 8 new style rules (including the noNamespace, useExportType, and useLiteralEnumMembers additions) maintain consistency with the configuration pattern. The useConsistentMemberAccessibility object structure with options is properly formatted.


81-100: Suspicious rules comprehensively expanded.

The 13 new suspicious rules (from noConfusingVoidType through useNamespaceKeyword) are well-integrated into the existing category. All maintain the "error" severity level established for this section.

Comment thread biome.json Resolved
@jamesbhobbs
jamesbhobbs marked this pull request as ready for review October 17, 2025 19:10
@jamesbhobbs
jamesbhobbs merged commit ab55df4 into main Oct 17, 2025
@jamesbhobbs
jamesbhobbs deleted the devin/1760727831-add-biome-rules-from-internal branch October 17, 2025 19:11
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