Skip to content

Conversation

@AyanavaKarmakar
Copy link
Contributor

@AyanavaKarmakar AyanavaKarmakar commented Jul 27, 2025

Pull Request

  • Updated biome.jsonc to ignore console.warn/error/assert/info
  • Fixed linter issues in docs module

Description

Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Refactor

    • Improved code clarity and maintainability across multiple components by restructuring logic, extracting repeated code into helper functions or standalone components, and switching to direct React imports.
    • Simplified or modularized components such as feature tables, testimonial cards, pricing calculators, and sidebar logic without affecting user-facing behavior.
    • Updated type annotations for consistency and clarity in several UI components.
  • Style

    • Added or updated lint-ignore comments throughout the codebase to suppress false positive warnings from the Biome linter.
    • Minor formatting and naming improvements for better code readability.
  • Bug Fixes

    • Made breadcrumb navigation elements keyboard-focusable for improved accessibility.
  • Chores

    • Updated linter configuration to allow specific console methods for improved development experience.

- Updated biome.jsonc to include new formatter options and VCS settings.
- Refactored package.json dependencies and scripts for better organization.
- Enhanced various components with improved imports and formatting for consistency.
- Cleaned up code in multiple files, ensuring adherence to coding standards and best practices.
- Added tab indentation and adjusted indent width in biome.jsonc.
- Refactored various components for consistent formatting and improved readability.
- Ensured adherence to coding standards by fixing linting issues in multiple files.
- Enhanced imports and component structures for better organization.
- Removed extensive linter rules and settings from biome.jsonc for a cleaner configuration.
- Updated formatter options to use tab indentation and adjusted indent width.
- Streamlined the structure of the configuration for better readability and maintainability.
@vercel
Copy link

vercel bot commented Jul 27, 2025

@AyanavaKarmakar is attempting to deploy a commit to the Databuddy Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2025

Walkthrough

This change set refactors React component files to use direct named imports instead of namespace imports, modularizes and clarifies complex logic (such as in sitemap generation and UI components), extracts repeated JSX into reusable components, and adds numerous Biome linter ignore comments to suppress false positives. Several component signatures are simplified, and some unused imports and props are removed. Type annotations are updated for clarity and consistency, and configuration files are updated to fine-tune linting rules.

Changes

Cohort / File(s) Change Summary
React Import Refactors
apps/dashboard/components/ui/slider.tsx, apps/database/components/ui/slider.tsx, apps/docs/components/ui/slider.tsx, apps/docs/components/ui/calendar.tsx, apps/docs/components/ui/carousel.tsx, apps/docs/components/ui/chart.tsx, apps/docs/components/ui/context-menu.tsx, apps/docs/components/ui/dropdown-menu.tsx, apps/docs/components/ui/form.tsx, apps/docs/components/ui/input-otp.tsx, apps/docs/components/ui/popover.tsx, apps/docs/components/ui/progress.tsx, apps/docs/components/ui/resizable.tsx, apps/docs/components/ui/sidebar.tsx, apps/docs/components/ui/toggle-group.tsx, apps/docs/hooks/use-mobile.ts
Replaces React namespace imports with named imports; updates hook and type usages accordingly; no logic changes.
Biome Lint Ignore Comments
apps/docs/app/global.css, apps/docs/components/ui/accordion.tsx, apps/docs/components/ui/alert-dialog.tsx, apps/docs/components/ui/aspect-ratio.tsx, apps/docs/components/ui/avatar.tsx, apps/docs/components/ui/checkbox.tsx, apps/docs/components/ui/collapsible.tsx, apps/docs/components/ui/dropdown-menu.tsx, apps/docs/components/ui/hover-card.tsx, apps/docs/components/ui/label.tsx, apps/docs/components/ui/menubar.tsx, apps/docs/components/ui/navigation-menu.tsx, apps/docs/components/ui/progress.tsx, apps/docs/components/ui/radio-group.tsx, apps/docs/components/ui/scroll-area.tsx, apps/docs/components/ui/select.tsx, apps/docs/components/ui/separator.tsx, apps/docs/components/ui/sheet.tsx, apps/docs/components/ui/switch.tsx, apps/docs/components/ui/tabs.tsx, apps/docs/components/ui/toggle.tsx, apps/docs/components/ui/tooltip.tsx, apps/docs/components/ui/toggle-group.tsx, apps/docs/components/ui/slider.tsx, apps/docs/components/ui/calendar.tsx, apps/docs/components/ui/chart.tsx, apps/docs/components/ui/context-menu.tsx, apps/docs/components/ui/popover.tsx, apps/docs/components/ui/resizable.tsx, apps/docs/next.config.mjs
Adds // biome-ignore lint: false positive comments to suppress linter warnings in specific files and locations.
Component Signature and Prop Simplification
apps/docs/components/features.tsx, apps/docs/app/(home)/page.tsx
Removes unused props and related type declarations from Features component and its usage.
JSX/Logic Refactors and Extraction
apps/docs/components/landing/comparison.tsx, apps/docs/components/landing/testimonials.tsx, apps/docs/components/pricing/pricing-page.tsx, apps/docs/components/bits/squares.tsx
Extracts repeated JSX into new components (FeatureRow, CardContent, ProviderRow), modularizes logic, and improves clarity without altering outputs.
Control Flow & Error Handling Clarifications
apps/docs/app/blog/[[...slug]]/page.tsx, apps/docs/app/docs/[[...slug]]/page.tsx, apps/docs/components/bits/liquid.tsx
Adds explicit block braces to single-line conditionals, makes error handling more explicit, and changes some functions from async to sync.
Type Annotation and Accessibility Improvements
apps/docs/components/ui/breadcrumb.tsx, apps/docs/components/ui/slider.tsx
Adds tabIndex={0} for keyboard accessibility; updates type annotations for props.
Sitemap Generator Refactor
apps/docs/lib/sitemap-generator.ts
Refactors sitemap logic into smaller helper functions for modularity and clarity; no change in output.
Configuration Update
biome.jsonc
Adds linter rules to allow specific console methods.
Minor Import/Prop Removals
apps/docs/app/layout.tsx, apps/docs/app/not-found.tsx, apps/docs/app/terms/page.tsx
Removes unused imports of icons and SDKs.
Minor Formatting & Attribute Changes
apps/docs/components/navbar.tsx, apps/docs/components/ui/pagination.tsx
Removes unused map index; adds explicit button type; removes navigation role attribute.
Structured Data and Lint Comments
apps/docs/components/structured-data.tsx
Adds a lint ignore comment above dangerouslySetInnerHTML.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FeaturesPage
  participant FeaturesComponent

  User->>FeaturesPage: Render page
  FeaturesPage->>FeaturesComponent: Render <Features />
  FeaturesComponent-->>FeaturesPage: Rendered JSX (no stars prop)
Loading
sequenceDiagram
  participant App
  participant SitemapGenerator

  App->>SitemapGenerator: generateSitemapEntries()
  SitemapGenerator->>SitemapGenerator: Use helper functions to process pages
  SitemapGenerator-->>App: Return sitemap entries
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Poem

In the warren where code bunnies dwell,
We tidied imports, linted well—
Components refactored, logic made clear,
Helper functions hopping far and near.
With keys unique and props now few,
This patch is fresh as morning dew!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

…files

- Refactored the Squares component to enhance the drawing logic and improve readability.
- Introduced a new FeatureRow component for better organization in the comparison section.
- Simplified the TestimonialCard component by extracting CardContent for clarity.
- Added utility functions for cost formatting and provider cost calculation in the pricing page.
- Updated the Carousel and Pagination components to remove unnecessary roles for better accessibility.
- Cleaned up the SidebarProvider logic for improved state management and readability.
- Introduced a new remote pattern for images to allow loading badges from startupfa.me.
- This enhancement improves the flexibility of image handling in the application.
- Removed the remote image pattern for badges from the Next.js configuration as it is no longer needed.
- Cleaned up the imports in the hero component by removing the unused Image import.
- Changed biome lint ignore comments to specify 'tailwind css directive' for better understanding and maintainability.
- Ensured consistency in commenting style across the global CSS file.
@AyanavaKarmakar AyanavaKarmakar changed the title chore: update biome configuration and fix some linter issues chore: update biome config + fix all lint issues in docs Jul 28, 2025
@AyanavaKarmakar AyanavaKarmakar marked this pull request as ready for review July 28, 2025 22:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

✅ Actions performed

Full review triggered.

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: 9

🔭 Outside diff range comments (3)
apps/docs/components/ui/collapsible.tsx (1)

12-22: Invalid Radix component reference – use Trigger, not CollapsibleTrigger

@radix-ui/react-collapsible exports Trigger, not CollapsibleTrigger.
Using the wrong member won’t compile and will throw at runtime once the type-checker or bundler processes this file.

-function CollapsibleTrigger({
-	...props
-}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
+function CollapsibleTrigger({
+	...props
+}: React.ComponentProps<typeof CollapsiblePrimitive.Trigger>) {
 	return (
-		<CollapsiblePrimitive.CollapsibleTrigger
+		<CollapsiblePrimitive.Trigger
 			data-slot="collapsible-trigger"
 			{...props}
 		/>
 	);
 }

Validate the other wrappers (accordion.tsx, tabs.tsx, etc.) for the same pattern.

apps/docs/components/ui/sheet.tsx (1)

76-78: Invalid Tailwind utility focus:outline-hidden

outline-hidden is not a standard Tailwind class; the valid utility to remove focus outlines is focus:outline-none. Leaving the current value will silently drop the class, so the element may still show a focus ring in some browsers.

-<SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
+<SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
apps/docs/components/ui/dropdown-menu.tsx (1)

183-183: Inconsistent type annotation usage.

Some components still use React.ComponentProps while others have been updated to use the imported ComponentProps. For consistency, these should also be updated to use the named import.

Apply this diff to maintain consistency:

-}: React.ComponentProps<'span'>) {
+}: ComponentProps<'span'>) {

-}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
+}: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {

-}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
+}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {

-}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
+}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {

Also applies to: 197-198, 206-207, 228-229

🧹 Nitpick comments (36)
apps/docs/components/ui/switch.tsx (1)

3-3: Be explicit about the suppressed rule and rationale

Blindly disabling the entire lint category can mask unrelated issues later. Biome supports scoping the ignore to a specific rule and adding a short justification, e.g.:

-// biome-ignore lint: false positive
+// biome-ignore lint/some-specific-rule: Radix `asChild` pattern incorrectly flagged

Consider tightening the suppression to just the offending rule and documenting the reason.

apps/docs/components/ui/menubar.tsx (1)

3-3: Prefer rule-scoped Biome ignore over blanket lint disable

Using the broad // biome-ignore lint: directive masks every rule at this location. Wherever possible, narrow it to the specific rule that triggers the false positive (e.g. // biome-ignore lint/some-rule) so future legitimate lint findings aren’t unintentionally silenced.

apps/docs/components/ui/hover-card.tsx (1)

3-3: Prefer rule-specific Biome pragmas over blanket lint ignores

Using a generic // biome-ignore lint disables all lint checks for the remainder of the file, which can hide unrelated issues that creep in later. Biome supports narrowing the pragma to the exact rule(s) that are producing false positives, e.g.

// biome-ignore lint/some-rule-id -- false positive with generic props spread

That keeps the safety net intact for every other rule and documents the precise problem.
If multiple rules need suppression, list them explicitly rather than turning the entire linter off.

apps/docs/components/ui/toggle.tsx (1)

3-3: Clarify suppressed rule in the ignore comment

Consider specifying the exact Biome rule being suppressed (e.g., // biome-ignore lint/specific-rule-id – <reason>). This makes it easier for future maintainers to understand why the lint was disabled and to re-evaluate the necessity later.

apps/docs/components/ui/tabs.tsx (1)

3-3: Narrow the linter suppression to the offending rule

// biome-ignore lint: false positive silences every rule on the following node, which can mask unrelated issues over time. If the false positive stems from a specific rule, consider scoping the directive, e.g.

// biome-ignore lint/some-rule-id: false positive

This keeps the rest of the lint protections intact.

apps/docs/components/ui/radio-group.tsx (1)

3-3: Narrow the ignore to the specific rule instead of silencing all lint checks

A blanket // biome-ignore lint suppresses every linter rule for the whole file, which risks masking unrelated issues later. Biome supports rule-scoped disables:

-// biome-ignore lint: false positive
+// biome-ignore lint/<rule-id>: false positive – see PR #36

Replacing <rule-id> with the exact rule that’s misfiring keeps other lint protections active.

apps/docs/components/ui/scroll-area.tsx (1)

3-3: Avoid blanket lint ignores—scope the rule and add context

Using a broad // biome-ignore lint suppresses every rule for the next statement, which can mask unrelated issues over time. Prefer disabling the specific rule that is mis-firing and include a short rationale, e.g.:

-// biome-ignore lint: false positive
+// biome-ignore lint/<rule-id>: false positive – <why the rule is wrong here>

This keeps the file protected by the rest of the Biome rule-set and leaves future maintainers with clearer intent.

apps/docs/components/ui/dialog.tsx (1)

3-3: Prefer rule-scoped ignore with a short rationale

Using a blanket // biome-ignore lint makes it hard to track which rule is suppressed and why. To aid future maintainers, narrow the ignore to the specific rule that misfires and add a brief justification.

-// biome-ignore lint: false positive
+// biome-ignore lint/<rule-category>/<rule-id> -- Radix types trigger a false positive here

Replace <rule-category>/<rule-id> with the exact rule name reported by Biome.

apps/docs/components/ui/separator.tsx (1)

3-3: Specify the exact Biome rule and brief rationale in ignore comment

A generic // biome-ignore lint: false positive makes it hard to track which rule was noisy and why it is safe to suppress. Biome supports // biome-ignore <rule-id> -- <reason>; being explicit improves maintainability and prevents blanket suppression from masking future real issues.

apps/docs/components/ui/select.tsx (1)

3-3: Narrow the Biome ignore scope

Using the broad directive // biome-ignore lint turns off all lint rules for the next statement, which can hide unrelated issues. Prefer disabling only the specific rule that is mis-firing, e.g.

-// biome-ignore lint: false positive
+// biome-ignore lint/<rule-id> -- false positive

Replace <rule-id> with the exact rule (e.g. lint/suspicious/noExplicitAny) so future legitimate problems are still reported.

apps/docs/components/ui/avatar.tsx (1)

3-3: Specify rule ID & rationale in lint-ignore comment

A blanket // biome-ignore lint without a rule identifier disables all lints for the line and gives future readers no clue which rule was a false positive. Biome supports // biome-ignore <rule> (e.g. lint/suspicious/noConsole) plus an optional -- reason suffix. Narrow-scoping the ignore keeps other lint checks active and documents intent.

-// biome-ignore lint: false positive
+// biome-ignore lint/suspicious/noExplicitAny -- false positive due to generics widening

This tiny change improves maintainability and avoids accidentally masking unrelated issues.

apps/docs/components/ui/checkbox.tsx (1)

3-3: Be explicit about the ignored rule and reason

// biome-ignore lint: false positive suppresses all linter diagnostics for this line. To aid future maintainers, prefer the more granular form:

// biome-ignore lint/specific-rule: brief justification

This documents exactly which rule was noisy and why it is safe to ignore, preventing accidental masking of unrelated issues later on.

apps/docs/components/ui/tooltip.tsx (3)

3-3: Limit the ignore directive to the specific rule you want to suppress

Using a blanket // biome-ignore lint disables all lint checks on the following node and can hide unrelated issues in future edits. Prefer a rule-scoped directive and keep the human-readable explanation after -- so future maintainers know why it’s safe.

-// biome-ignore lint: false positive
+// biome-ignore lint/suspicious/noConsole -- false positive

(Replace suspicious/noConsole with the exact rule that triggered the false positive.)


32-36: Forward refs to maintain Radix’s expected ref contract

TooltipPrimitive.Trigger forwards refs to the underlying DOM element, but wrapping it in a plain function component swallows that ref. Consumers who need a ref (or Radix internals relying on it) will silently break.

-function TooltipTrigger({
-	...props
-}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
-	return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
-}
+const TooltipTrigger = React.forwardRef<
+	React.ElementRef<typeof TooltipPrimitive.Trigger>,
+	React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>
+>(function TooltipTrigger(props, ref) {
+	return (
+		<TooltipPrimitive.Trigger
+			ref={ref}
+			data-slot="tooltip-trigger"
+			{...props}
+		/>
+	);
+});

Exports stay unchanged since forwardRef returns a component.


22-30: Avoid instantiating a new TooltipProvider for every tooltip

Wrapping each TooltipPrimitive.Root with its own provider works but is unnecessary and slightly increases render depth. A common pattern is to mount one <TooltipProvider> once (e.g., near App) and render individual <Tooltip> instances inside it.

If a per-tooltip provider isn’t strictly required, consider exposing TooltipProvider separately (it already is) and let callers decide:

// in application code
<TooltipProvider>
	<Tooltip ... />
	<Tooltip ... />
</TooltipProvider>

This reduces tree size and ensures shared delayDuration configuration.

apps/docs/components/ui/collapsible.tsx (1)

3-3: Prefer a granular Biome-ignore directive instead of a blanket disable

The comment disables all lint rules for the next statement, which can mask unrelated problems in future edits. Biome supports targeting a specific rule, e.g.

// biome-ignore lint/suspicious/noExplicitAny: false positive in Radix typings

Narrowing the suppression to the exact rule keeps the rest of the linter protection active.

apps/docs/app/not-found.tsx (2)

1-13: Re-evaluate the top-level 'use client' directive
Marking the whole 404 page as a Client Component ships the entire JSX tree to the browser. Only two interactive bits actually need client-side JS:
• the Navbar (already a Client Component)
• the “Go Back” button’s onClick handler

Everything else is static. You could regain some bundle savings by:

  1. Turning not-found.tsx back into a Server Component (remove 'use client'), and
  2. Extracting a tiny GoBackButton Client Component that handles the router.back() call.

This way, static markup stays server-rendered while only the minimal interactive islands are hydrated.


57-64: Prefer Next.js router over the raw window.history API
Using the app-router helper keeps navigation consistent (works with middleware, analytics, etc.) and avoids direct DOM access.

-import { ArrowLeft, Home } from 'lucide-react';
+import { ArrowLeft, Home } from 'lucide-react';
+import { useRouter } from 'next/navigation';
...
+	const router = useRouter();
...
-	onClick={() => window.history.back()}
+	onClick={() => router.back()}
apps/docs/components/ui/sheet.tsx (1)

3-3: Prefer rule-specific Biome ignore comments

Using the broad // biome-ignore lint disables all lint checks for the next line. Narrowing the ignore to the exact rule (e.g. lint/suspicious/noConsole) keeps other protections intact and avoids masking future issues.

apps/docs/components/features.tsx (2)

130-136: key={item.id} is fine but relies on global uniqueness

Using item.id as the React key is correct as long as the values are unique per rendered list. Ensure no duplicate id values sneak in later (especially if the arrays are built dynamically).


146-148: dangerouslySetInnerHTML remains – keep the “false positive” comment specific

The content is hard-coded so XSS risk is negligible, but consider converting <strong> tags to React nodes to remove the need for dangerouslySetInnerHTML entirely and drop the ignore directive.

Also applies to: 197-199

apps/docs/components/ui/label.tsx (2)

3-4: Specify the exact rule in the biome-ignore directive.

Using a broad // biome-ignore lint: suppresses all linter diagnostics for the following statement.
If you are targeting a single false-positive, prefer the more granular form:

// biome-ignore lint/some-rule-id: false positive

This preserves coverage for any other issues that might surface later.
Please update (and follow the same pattern across the repo) unless there is a deliberate reason to blanket-disable linting here.


8-21: Consider switching to React.forwardRef for better ergonomics.

LabelPrimitive.Root accepts a ref, but the current wrapper drops it.
Forwarding the ref keeps the component drop-in compatible with Radix primitives and prevents surprises when consumers attempt:

const ref = React.useRef<HTMLLabelElement>(null);
<Label ref={ref} htmlFor="input-id">Name</Label>

Minimal change:

-function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
-  return (
-    <LabelPrimitive.Root
-      className={cn(/* … */ className)}
-      data-slot="label"
-      {...props}
-    />
-  );
-}
+const Label = React.forwardRef<
+  React.ElementRef<typeof LabelPrimitive.Root>,
+  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
+>(function Label({ className, ...props }, ref) {
+  return (
+    <LabelPrimitive.Root
+      ref={ref}
+      className={cn(/* … */ className)}
+      data-slot="label"
+      {...props}
+    />
+  );
+});
+
+Label.displayName = 'Label';

This is a non-breaking enhancement but improves usability.

apps/docs/lib/sitemap-generator.ts (3)

5-42: Good refactoring with centralized configuration mappings.

The extraction of priority and change frequency mappings into centralized objects is a solid improvement for maintainability. The regex pattern for integration pages is correct and the priority values are well-structured.

Consider consolidating the duplicate data between priorityMap, changeFrequencyMap, and getFallbackEntries() into a single configuration object:

+interface PageConfig {
+  priority: number;
+  changeFrequency: 'weekly' | 'monthly' | 'yearly';
+}
+
+const pageConfigs: Record<string, PageConfig> = {
+  '/docs': { priority: 1.0, changeFrequency: 'weekly' },
+  '/docs/getting-started': { priority: 0.9, changeFrequency: 'weekly' },
+  // ... other entries
+};

This would eliminate the duplication and serve as a single source of truth.


67-77: Consider a more functional approach to avoid in-place mutations.

The logic for prioritizing React and Next.js integrations is sound, but the in-place mutation of the entries array could make the code harder to reason about and test.

Consider returning a new array instead of mutating in-place:

-function processIntegrationPages(entries: MetadataRoute.Sitemap): void {
-  for (const entry of entries) {
-    const match = entry.url.match(integrationPattern);
-    if (match) {
-      const integrationName = match[1];
-      if (integrationName === 'react' || integrationName === 'nextjs') {
-        entry.priority = 0.8;
-      }
-    }
-  }
-}
+function processIntegrationPages(entries: MetadataRoute.Sitemap): MetadataRoute.Sitemap {
+  return entries.map(entry => {
+    const match = entry.url.match(integrationPattern);
+    if (match) {
+      const integrationName = match[1];
+      if (integrationName === 'react' || integrationName === 'nextjs') {
+        return { ...entry, priority: 0.8 };
+      }
+    }
+    return entry;
+  });
+}

79-107: LGTM! Good separation of concerns with appropriate defaults.

The page processing functions properly separate different content types with appropriate priority and change frequency defaults. Blog pages having 'weekly' updates and non-doc pages having 'yearly' updates makes sense for their respective content types.

These functions follow a very similar pattern and could potentially be consolidated into a single generic function:

function processPages<T extends { url: string }>(
  pages: T[],
  baseUrl: string,
  lastModified: Date,
  priority?: number,
  changeFrequency?: 'weekly' | 'monthly' | 'yearly'
): MetadataRoute.Sitemap {
  return pages.map((page) =>
    createSitemapEntry(page.url, baseUrl, lastModified, priority, changeFrequency)
  );
}
apps/docs/components/ui/accordion.tsx (1)

3-3: Make the ignore directive rule-specific

// biome-ignore lint: false positive masks every possible rule. Prefer restricting it to the exact rule that’s mis-firing, e.g.:

// biome-ignore lint/no-namespace-import: false positive

This keeps the rest of the lint protections intact.

apps/docs/components/ui/alert-dialog.tsx (1)

3-3: Narrow the Biome suppression to the offending rule

Blanket disables can hide future real problems. Specify the concrete rule instead of disabling all linting for the file line.

apps/docs/components/ui/aspect-ratio.tsx (1)

3-3: Prefer targeted lint suppression

Same observation as in other UI files: scope the biome-ignore comment to the particular rule that reports a false positive.

apps/docs/components/ui/carousel.tsx (2)

59-60: Prop typing & a11y mismatch with new <section> root

  1. The component now renders <section> but still exposes ComponentProps<'div'>; consumers lose section-specific attributes (e.g. aria‐labelledby).
  2. role="region" was removed; a <section> is only exposed to AT as a region when it has an accessible name, which this element doesn’t guarantee.
-}: ComponentProps<'div'> & CarouselProps) {
+}: ComponentProps<'section'> & CarouselProps) {

Also consider reinstating role="region" or adding a mandatory heading to maintain landmark semantics.

Also applies to: 133-141


99-118: Event-listener leak: reInit never unsubscribed

Only the select handler is removed in the cleanup, leaving reInit attached forever and causing stale‐closure issues.

-		return () => {
-			api?.off('select', onSelect);
-		};
+		return () => {
+			api?.off('select', onSelect);
+			api?.off('reInit', onSelect);
+		};
apps/docs/components/ui/sidebar.tsx (2)

85-99: Cookie write inside render callback may fire excessively

setOpen writes document.cookie every time the setter is invoked—even if the value
doesn’t change. Minor, but can generate redundant cookie updates.

Consider short-circuiting when openState === open.


618-646: Random-width skeleton: move Math.random() out of render

useMemo hides the randomness but still executes once per mount. If SSR/CSR mismatch must be avoided, derive the width in useEffect or supply a deterministic seed from props.

Not blocking, just flagging.

apps/database/components/ui/slider.tsx (1)

16-24: Default _values produces two thumbs for single-value sliders

When neither value nor defaultValue is an array, you fall back to
[min, max], which renders two thumbs—even for a single-value slider.

-	return [min, max];
+	return [typeof value === 'number'
+		? value
+		: typeof defaultValue === 'number'
+			? defaultValue
+			: min];

Keeps existing behavior for range sliders while avoiding an extra thumb.

apps/docs/components/ui/slider.tsx (1)

53-60: Consider consistency with dashboard slider implementation.

The dashboard version of this slider uses direct mapping over _values and enhanced key props for better performance. Consider aligning the rendering approach for consistency.

Apply this diff to match the dashboard implementation:

-			{Array.from({ length: _values.length }, (_, index) => (
+			{_values.map((value, index) => (
 				<SliderPrimitive.Thumb
 					className="block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50"
 					data-slot="slider-thumb"
-					// biome-ignore lint: false positive
-					key={index}
+					key={`slider-thumb-${index}-${value}`}
 				/>
 			))}
apps/docs/components/ui/context-menu.tsx (1)

3-4: Be explicit about the ignored rule instead of muting everything

// biome-ignore lint: false positive disables all linter diagnostics for the next line.
Target the concrete rule that is mis-firing so future issues are still reported, e.g.

// biome-ignore lint/noConsole: false positive – Radix sets up its own logger
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0065882 and 3ac1efe.

📒 Files selected for processing (57)
  • apps/dashboard/components/ui/slider.tsx (3 hunks)
  • apps/database/components/ui/slider.tsx (1 hunks)
  • apps/docs/app/(home)/page.tsx (1 hunks)
  • apps/docs/app/blog/[[...slug]]/page.tsx (3 hunks)
  • apps/docs/app/docs/[[...slug]]/page.tsx (4 hunks)
  • apps/docs/app/global.css (2 hunks)
  • apps/docs/app/layout.tsx (0 hunks)
  • apps/docs/app/not-found.tsx (1 hunks)
  • apps/docs/app/terms/page.tsx (0 hunks)
  • apps/docs/components/bits/liquid.tsx (1 hunks)
  • apps/docs/components/bits/squares.tsx (4 hunks)
  • apps/docs/components/features.tsx (5 hunks)
  • apps/docs/components/landing/comparison.tsx (2 hunks)
  • apps/docs/components/landing/testimonials.tsx (1 hunks)
  • apps/docs/components/navbar.tsx (2 hunks)
  • apps/docs/components/pricing/pricing-page.tsx (3 hunks)
  • apps/docs/components/structured-data.tsx (1 hunks)
  • apps/docs/components/theme-toggle.tsx (1 hunks)
  • apps/docs/components/ui/accordion.tsx (1 hunks)
  • apps/docs/components/ui/alert-dialog.tsx (1 hunks)
  • apps/docs/components/ui/aspect-ratio.tsx (1 hunks)
  • apps/docs/components/ui/avatar.tsx (1 hunks)
  • apps/docs/components/ui/breadcrumb.tsx (1 hunks)
  • apps/docs/components/ui/calendar.tsx (5 hunks)
  • apps/docs/components/ui/carousel.tsx (8 hunks)
  • apps/docs/components/ui/chart.tsx (10 hunks)
  • apps/docs/components/ui/checkbox.tsx (1 hunks)
  • apps/docs/components/ui/collapsible.tsx (1 hunks)
  • apps/docs/components/ui/context-menu.tsx (10 hunks)
  • apps/docs/components/ui/dialog.tsx (1 hunks)
  • apps/docs/components/ui/dropdown-menu.tsx (9 hunks)
  • apps/docs/components/ui/form.tsx (8 hunks)
  • apps/docs/components/ui/hover-card.tsx (1 hunks)
  • apps/docs/components/ui/input-otp.tsx (3 hunks)
  • apps/docs/components/ui/label.tsx (1 hunks)
  • apps/docs/components/ui/menubar.tsx (1 hunks)
  • apps/docs/components/ui/navigation-menu.tsx (1 hunks)
  • apps/docs/components/ui/pagination.tsx (0 hunks)
  • apps/docs/components/ui/popover.tsx (3 hunks)
  • apps/docs/components/ui/progress.tsx (1 hunks)
  • apps/docs/components/ui/radio-group.tsx (1 hunks)
  • apps/docs/components/ui/resizable.tsx (2 hunks)
  • apps/docs/components/ui/scroll-area.tsx (1 hunks)
  • apps/docs/components/ui/select.tsx (1 hunks)
  • apps/docs/components/ui/separator.tsx (1 hunks)
  • apps/docs/components/ui/sheet.tsx (1 hunks)
  • apps/docs/components/ui/sidebar.tsx (8 hunks)
  • apps/docs/components/ui/slider.tsx (3 hunks)
  • apps/docs/components/ui/switch.tsx (1 hunks)
  • apps/docs/components/ui/tabs.tsx (1 hunks)
  • apps/docs/components/ui/toggle-group.tsx (2 hunks)
  • apps/docs/components/ui/toggle.tsx (1 hunks)
  • apps/docs/components/ui/tooltip.tsx (1 hunks)
  • apps/docs/hooks/use-mobile.ts (1 hunks)
  • apps/docs/lib/sitemap-generator.ts (1 hunks)
  • apps/docs/next.config.mjs (2 hunks)
  • biome.jsonc (1 hunks)
💤 Files with no reviewable changes (3)
  • apps/docs/app/terms/page.tsx
  • apps/docs/components/ui/pagination.tsx
  • apps/docs/app/layout.tsx
🧰 Additional context used
🧬 Code Graph Analysis (7)
apps/docs/app/(home)/page.tsx (1)
apps/docs/components/features.tsx (1)
  • Features (104-242)
apps/docs/components/ui/toggle-group.tsx (1)
apps/docs/components/ui/toggle.tsx (1)
  • toggleVariants (48-48)
apps/docs/app/blog/[[...slug]]/page.tsx (1)
apps/docs/app/docs/[[...slug]]/page.tsx (1)
  • generateStaticParams (72-74)
apps/docs/lib/sitemap-generator.ts (2)
apps/docs/lib/source.ts (1)
  • source (5-9)
apps/docs/lib/blog-source.ts (1)
  • blogSource (5-8)
apps/docs/app/docs/[[...slug]]/page.tsx (1)
apps/docs/app/blog/[[...slug]]/page.tsx (1)
  • generateStaticParams (277-279)
apps/docs/components/ui/sidebar.tsx (3)
apps/dashboard/components/ui/sidebar.tsx (1)
  • useSidebar (724-724)
apps/database/components/ui/sidebar.tsx (1)
  • useSidebar (724-724)
apps/docs/hooks/use-mobile.ts (1)
  • useIsMobile (5-19)
apps/docs/components/landing/testimonials.tsx (2)
apps/docs/components/ui/card.tsx (1)
  • CardContent (91-91)
apps/docs/components/ui/avatar.tsx (3)
  • Avatar (54-54)
  • AvatarImage (54-54)
  • AvatarFallback (54-54)
🔇 Additional comments (64)
apps/docs/components/navbar.tsx (2)

29-29: Good cleanup: removing unused parameter.

Removing the unused index parameter from the map callback improves code clarity and resolves linting warnings.


65-65: Excellent accessibility improvement.

Adding type="button" explicitly declares the button's intent and prevents unintended form submission behavior. This is a best practice for interactive buttons.

apps/docs/components/ui/breadcrumb.tsx (1)

60-60: Good accessibility enhancement with proper keyboard focus.

Adding tabIndex={0} makes the current page breadcrumb keyboard-focusable, which aligns well with the role="link" attribute. This follows accessibility best practices for breadcrumb navigation.

Note: The combination of aria-disabled="true" and tabIndex={0} is intentional for current page indicators - they should be focusable for screen readers but not actionable.

apps/docs/app/not-found.tsx (1)

3-3: Unused icon import was correctly pruned – good cleanup
Link2Off was not referenced anywhere in the file, so removing it keeps the bundle a bit leaner and quiets the linter.

apps/docs/components/features.tsx (1)

104-104: Component signature dropped all props – double-check external usages & exported type

Features no longer expects any props. Good simplification, but please run a quick repo-wide search to ensure no other call-sites still pass stars (or rely on a FeaturesProps type).

apps/docs/app/(home)/page.tsx (1)

38-38: Call-site updated correctly – nice cleanup

<Features /> is now invoked without the obsolete stars prop. No further action needed.

apps/docs/components/ui/label.tsx (1)

11-11: No action needed – React namespace is globally available

Ran a project-wide search and confirmed numerous files (including label.tsx) use React.ComponentProps without an import. Since the codebase compiles successfully, the global React type from @types/react is present and no import type * as React from 'react' is required.

apps/docs/lib/sitemap-generator.ts (4)

44-50: LGTM! Clean abstraction with appropriate fallbacks.

The helper functions provide good abstraction over the configuration maps. The fallback logic for integration pages (0.7 priority) and the default 'weekly' change frequency are reasonable defaults for a documentation site.


52-65: LGTM! Well-designed helper function with clear interface.

The createSitemapEntry function provides excellent centralization of sitemap entry creation with a clean interface. The optional parameters with fallbacks to the helper functions provide good flexibility while maintaining consistency.


180-200: LGTM! Solid error handling and clear orchestration.

The main function properly orchestrates the sitemap generation with good error handling. The fallback strategy ensures the sitemap is always generated even if dynamic page retrieval fails.

If you implement the suggested change to make processIntegrationPages return a new array instead of mutating in-place, remember to update line 193:

-processIntegrationPages(entries);
+entries.splice(0, entries.length, ...processIntegrationPages(entries));

Or better yet, restructure to avoid mutation entirely.


202-216: LGTM! Good SEO metadata.

The sitemap metadata function provides appropriate title, description, and keywords for SEO purposes. The metadata accurately describes the sitemap content.

apps/docs/components/landing/testimonials.tsx (2)

102-140: Well-executed component extraction for better separation of concerns.

The CardContent component successfully extracts the complex JSX structure while maintaining the same visual output. The component is properly typed using (typeof testimonials)[0] which ensures type safety.


142-156: Clean conditional rendering logic.

The refactored TestimonialCard component now has a clear separation between the conditional linking logic and the card content rendering. The early return pattern makes the code more readable and maintainable.

apps/docs/components/bits/squares.tsx (5)

35-37: Improved null safety with early return.

The enhanced null check with explicit early return improves code readability and prevents potential issues downstream.


47-72: Well-structured drawSquare function extraction.

The extracted function properly encapsulates the square drawing logic with appropriate null checks. The hover detection logic is clearly separated and the drawing operations are well-organized.


74-93: Clean gradient drawing separation.

The drawGradient function is properly extracted with its own null check, making the code more modular and easier to maintain.


95-114: Excellent modularization of drawing logic.

The refactored drawGrid function effectively orchestrates the drawing process by calling the extracted helper functions. The logic flow is clear and maintainable.


186-188: Enhanced cleanup with null check.

The addition of the null check before cancelAnimationFrame prevents potential issues during component cleanup.

apps/docs/components/landing/comparison.tsx (2)

86-173: Excellent extraction of complex feature row logic.

The FeatureRow component successfully encapsulates both desktop and mobile layouts while maintaining proper TypeScript typing. The component handles the conditional rendering of check/cross icons consistently across all platforms. The separation makes the code much more maintainable and reduces duplication.


231-231: Clean integration of the extracted component.

The simplified mapping using the FeatureRow component makes the main component much more readable while maintaining the same functionality.

apps/docs/components/pricing/pricing-page.tsx (5)

72-72: Simplified Google Analytics calculation.

The no-argument function returning 0 is cleaner and more appropriate since Google Analytics doesn't have a monetary cost in this context.


324-329: Well-implemented cost formatting helper.

The formatCost function centralizes the formatting logic with proper handling of both numeric and string values. The number formatting with consistent decimal places improves the user experience.


331-347: Smart provider-specific cost calculation.

The getProviderCost function effectively handles the special cases for Fathom and Plausible while falling back to the generic calc method for other providers. This approach maintains flexibility while ensuring consistent formatting.


349-364: Clean table row component extraction.

The ProviderRow component successfully extracts the repeated table row logic, making the main component more readable and maintainable. The integration with the helper functions is seamless.


528-532: Improved component integration.

The use of the extracted ProviderRow component with proper prop passing makes the table rendering much cleaner and more maintainable.

apps/docs/components/ui/input-otp.tsx (3)

5-5: LGTM! Import modernization looks good.

The change from namespace import to selective named import of useContext improves import clarity and follows modern React patterns.


46-46: LGTM! Consistent with the import change.

The direct usage of useContext is consistent with the updated import statement and maintains the same functionality.


71-71: Confirm accessibility for OTP separator

The separator <div data-slot="input-otp-separator"> in apps/docs/components/ui/input-otp.tsx no longer has role="separator", while two production variants still do:

  • apps/dashboard/components/ui/input-otp.tsx:71
  • apps/database/components/ui/input-otp.tsx:71

• If this divider is purely decorative, consider marking it aria-hidden="true" or using role="presentation" (or even a native <hr> with aria-hidden="true").
• If it must convey a semantic separation to assistive technologies, restore role="separator" (or swap in a semantic element).
• Ensure your docs demo and production implementations remain consistent and aligned with your accessibility requirements.

apps/docs/next.config.mjs (1)

11-11: LGTM! Appropriate lint suppression.

The biome-ignore lint: false positive comments appropriately suppress incorrect lint warnings without affecting the functionality of the headers() and redirects() functions. This is consistent with the broader pattern of addressing false positives across the codebase.

Also applies to: 52-52

apps/docs/components/bits/liquid.tsx (1)

32-34: LGTM! Improved code formatting.

The expansion from a single-line conditional to a multi-line block improves code readability and consistency. The logic remains unchanged - it's still an early return when containerRef.current is null.

apps/docs/hooks/use-mobile.ts (1)

1-1: LGTM! Excellent import modernization.

The change from namespace import (import * as React) to selective named imports (import { useEffect, useState }) is a best practice that:

  • Improves tree-shaking and bundle efficiency
  • Makes dependencies more explicit
  • Follows modern React patterns

The corresponding updates to use direct useState and useEffect calls maintain the same functionality while being more concise.

Also applies to: 6-6, 8-8

apps/docs/components/ui/toggle-group.tsx (2)

3-3: LGTM! Appropriate lint suppression.

The biome-ignore lint: false positive comment appropriately addresses incorrect lint warnings, consistent with the broader codebase cleanup.


6-6: LGTM! Excellent React import modernization.

The changes demonstrate good modern React practices:

  • Selective imports (createContext, useContext) instead of namespace import
  • Direct usage of React APIs without namespace prefix
  • Maintains identical functionality while improving code clarity

This is consistent with the broader pattern of React import modernization across the codebase.

Also applies to: 10-10, 49-49

apps/docs/app/global.css (1)

6-6: LGTM! Appropriate use of biome-ignore comments for CSS directives.

The biome-ignore comments are correctly placed to suppress false positive lint warnings for valid Tailwind CSS directives (@custom-variant, @theme, @apply) and CSS properties that Biome may not recognize as valid.

Also applies to: 13-13, 144-144, 148-148, 154-154

apps/docs/components/ui/form.tsx (3)

5-5: LGTM! Improved import style with direct named imports.

The change from namespace import to selective named imports (ComponentProps, createContext, useContext, useId) improves code clarity and follows modern React patterns.


27-27: LGTM! Consistent usage of directly imported React utilities.

All usages have been properly updated to use the directly imported functions instead of the React namespace, maintaining consistency with the new import style.

Also applies to: 45-46, 71-71, 76-76


75-75: LGTM! Updated type annotations to use direct ComponentProps import.

The type annotations have been consistently updated to use the directly imported ComponentProps type instead of React.ComponentProps.

Also applies to: 92-92, 106-106, 123-123, 136-136

apps/docs/app/blog/[[...slug]]/page.tsx (3)

20-22: LGTM! Explicit block braces improve control flow clarity.

Adding explicit braces around the notFound() call makes the control flow more readable and consistent with similar patterns in the codebase.


277-279: LGTM! Appropriate conversion from async to sync function.

Converting generateStaticParams from async to sync is correct since it only returns blogSource.generateParams() directly without any async operations. This aligns with the similar change in apps/docs/app/docs/[[...slug]]/page.tsx at lines 72-74.


286-288: LGTM! Consistent explicit block braces for error handling.

The explicit braces around the notFound() call in generateMetadata maintain consistency with the similar change in the main component function.

apps/docs/app/docs/[[...slug]]/page.tsx (4)

18-20: LGTM! Explicit block braces improve readability.

Adding explicit braces around the notFound() call enhances control flow clarity and consistency.


35-35: LGTM! Safe handling of potentially undefined slug.

Using optional chaining with nullish coalescing (params.slug?.length ?? 0) properly handles cases where params.slug might be undefined, preventing potential runtime errors.


72-74: LGTM! Appropriate async to sync conversion.

Converting generateStaticParams to a synchronous function is correct since it only returns source.generateParams() directly. This matches the similar change in apps/docs/app/blog/[[...slug]]/page.tsx at lines 277-279.


81-83: LGTM! Consistent error handling pattern.

The explicit braces around notFound() in generateMetadata maintain consistency with the similar change in the main component.

apps/docs/components/ui/calendar.tsx (3)

8-8: LGTM! Improved import style with direct named imports.

Changing from React namespace import to selective named imports (useEffect, useRef) follows modern React patterns and improves code clarity.


122-122: LGTM! Appropriate biome-ignore comments for inline components.

The biome-ignore comments correctly suppress false positive lint warnings for legitimate inline component definitions (Root, Chevron, WeekNumber) that are part of the DayPicker component API.

Also applies to: 133-133, 155-155


186-191: LGTM! Consistent usage of named imports with improved formatting.

The CalendarDayButton function correctly uses the directly imported useRef and useEffect hooks. The reformatted useEffect callback maintains the same behavior while improving readability.

apps/docs/components/ui/progress.tsx (1)

3-6: Imports & typings look good

The switch to a typed named import is clean and keeps tree-shaking intact; no issues spotted.

apps/docs/components/ui/resizable.tsx (1)

4-6: Consistent type-only import – no concerns

Import refinements are consistent with the project-wide pattern.

apps/docs/components/ui/dropdown-menu.tsx (2)

6-6: LGTM! Import refactoring improves tree-shaking.

The change from namespace import to named import of ComponentProps is a good optimization that can help with bundle size.


3-3: biome-ignore comment consistency verified
The // biome-ignore lint: false positive directive is used uniformly across 30+ UI components to suppress known false positives. No update is needed to specify individual rule names given existing codebase conventions.

apps/dashboard/components/ui/slider.tsx (3)

4-4: LGTM! Import optimization.

The change to import only useMemo instead of the entire React namespace is a good optimization for tree-shaking.


16-24: Excellent refactoring for readability.

The change from nested ternary operators to explicit if-else statements in useMemo significantly improves code readability while maintaining the same logic.


52-56: Great improvement to key prop uniqueness.

The enhanced key prop that combines index and value (slider-thumb-${index}-${value}) provides better uniqueness and can help React's reconciliation algorithm perform more efficiently.

apps/docs/components/ui/popover.tsx (2)

5-5: LGTM! Consistent import refactoring.

The changes consistently replace React namespace imports with named imports and update all type annotations accordingly. This is well-executed and improves tree-shaking.

Also applies to: 9-9, 15-15, 24-24, 43-43


3-3: Specify the lint rule in the biome-ignore comment

The ignore directive on line 3 should reference the exact rule being suppressed rather than a blanket “false positive.” Please confirm which Biome lint rule is firing here and update the comment accordingly.

• File: apps/docs/components/ui/popover.tsx
• Line: 3
• Example change:

- // biome-ignore lint: false positive
+ // biome-ignore lint no-unused-vars: false positive
apps/docs/components/ui/slider.tsx (2)

5-5: LGTM! Import and type annotation improvements.

The changes to use named imports (ComponentProps, useMemo) and update type annotations accordingly are beneficial for tree-shaking and consistency.

Also applies to: 16-16


17-25: Excellent memoization refactoring.

The change from nested ternary operators to explicit if-else statements significantly improves readability while maintaining identical logic.

apps/docs/components/ui/chart.tsx (5)

3-10: Excellent comprehensive import refactoring.

The change from namespace imports to specific named imports is well-executed and will significantly improve tree-shaking. All necessary React hooks and types are properly imported.


11-11: LGTM! Appropriate lint ignore comments with context.

The biome lint ignore comments are properly contextualized:

  • Line 11: For Recharts import (consistent with other UI components)
  • Line 91: For dangerouslySetInnerHTML (legitimate use case for dynamic CSS)
  • Line 191: For map rendering (likely false positive for React key props)

Also applies to: 91-91, 191-191


33-33: LGTM! Consistent React hook usage updates.

All React hooks (createContext, useContext, useId, useMemo) are properly updated to use the named imports instead of namespace access.

Also applies to: 36-36, 57-57, 140-140


51-55: LGTM! Type annotation consistency.

All ComponentProps type annotations have been consistently updated to use the named import instead of React.ComponentProps.

Also applies to: 130-131, 269-269


82-82: Good variable naming improvement.

The parameter renaming from an unnamed destructured parameter to itemConfig improves code readability and makes the filter logic clearer.

apps/docs/components/ui/context-menu.tsx (1)

6-6: ComponentProps requires @types/react ≥ 18

ComponentProps was added in the @types/react 18 line.
If your consumers still install React 17 typings (or lock to an older minor), the build will break.
Please verify that the repo’s peer-dependency and CI matrix enforce @types/react 18+.

Comment on lines +107 to 110
// biome-ignore lint: false positive
dangerouslySetInnerHTML={{
__html: JSON.stringify(getStructuredData()),
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

dangerouslySetInnerHTML still deserves explicit output sanitisation

Even though the payload is JSON-LD, dangerouslySetInnerHTML makes this node part of the DOM and any unsanitised string interpolation (e.g., title, description) could open a reflected-XSS vector if they ever come from user input.
Consider:

-<Script
-  // biome-ignore lint: false positive
-  dangerouslySetInnerHTML={{
-    __html: JSON.stringify(getStructuredData()),
-  }}
+// biome-ignore lint/security false-positive – JSON-LD requires raw injection.
+<Script
+  dangerouslySetInnerHTML={{
+    // Explicitly stringify with an escapable replacer to guard against </script>
+    __html: JSON.stringify(getStructuredData()).replace(/<\/script/gi, '<\\/script'),
+  }}

At minimum, add a comment clarifying why the data is trusted and what guarantees keep it safe.

🤖 Prompt for AI Agents
In apps/docs/components/structured-data.tsx around lines 107 to 110, the use of
dangerouslySetInnerHTML with JSON-LD data lacks explicit sanitization, which
could pose an XSS risk if any interpolated values come from user input. To fix
this, add a clear comment explaining why the data is considered safe and
trusted, detailing any guarantees or validations that prevent unsafe content
from being injected. This clarifies the security posture and justifies the use
of dangerouslySetInnerHTML here.

Comment on lines 19 to 24
const toggleTheme = () => {
if (!document.startViewTransition) switchTheme();
if (!document.startViewTransition) {
switchTheme();
}
document.startViewTransition(switchTheme);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Unconditional call to document.startViewTransition causes a runtime crash on unsupported browsers

When the API is missing, the guard runs switchTheme() but then the next line still executes, dereferencing undefined:

if (!document.startViewTransition) {
  switchTheme();
}
document.startViewTransition(switchTheme); // 💥 TypeError when undefined

Guard the call or use optional chaining:

-if (!document.startViewTransition) {
-  switchTheme();
-}
-document.startViewTransition(switchTheme);
+if (document.startViewTransition) {
+  document.startViewTransition(switchTheme);
+} else {
+  switchTheme();
+}

This preserves functionality without breaking older browsers.

🤖 Prompt for AI Agents
In apps/docs/components/theme-toggle.tsx around lines 19 to 24, the call to
document.startViewTransition is unconditional, causing a runtime crash on
browsers that do not support this API. Fix this by guarding the call with a
check for document.startViewTransition or use optional chaining to call it only
if it exists, ensuring switchTheme() is called directly otherwise. This prevents
dereferencing undefined and maintains compatibility with older browsers.

Comment on lines +7 to +14
import {
type ComponentProps,
createContext,
useCallback,
useContext,
useEffect,
useState,
} from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Missing React namespace for KeyboardEvent – compilation will fail

handleKeyDown uses the type React.KeyboardEvent, but the React namespace is no longer imported.
With isolatedModules / importsNotUsedAsValues enabled, the file will not compile.

-import {
-	type ComponentProps,
-	createContext,
-	useCallback,
-	useContext,
-	useEffect,
-	useState,
-} from 'react';
+import {
+	type ComponentProps,
+	type KeyboardEvent as ReactKeyboardEvent,
+	createContext,
+	useCallback,
+	useContext,
+	useEffect,
+	useState,
+} from 'react';
-const handleKeyDown = useCallback(
-	(event: React.KeyboardEvent<HTMLDivElement>) => {
+const handleKeyDown = useCallback(
+	(event: ReactKeyboardEvent<HTMLDivElement>) => {

Alternative: re-add a import * as React from 'react' type-only import, but aligning with the new named-import style keeps the file consistent.

Also applies to: 86-97

🤖 Prompt for AI Agents
In apps/docs/components/ui/carousel.tsx around lines 7 to 14 and also lines 86
to 97, the type React.KeyboardEvent is used but the React namespace is not
imported, causing compilation errors with isolatedModules enabled. Fix this by
explicitly importing the KeyboardEvent type from React using a named import, for
example, add "import { KeyboardEvent } from 'react';" or include KeyboardEvent
in the existing named imports to ensure the type is recognized without importing
the entire React namespace.

Comment on lines 10 to 14
function ContextMenu({
...props
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
}: ComponentProps<typeof ContextMenuPrimitive.Root>) {
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Forward refs; they are currently dropped

Each wrapper is typed with ComponentProps<…> which includes an optional ref, but the plain-function wrapper does not forward that ref.
Consumers will see a type-safe ref prop, yet at runtime get
“Function components cannot be given refs”, and Radix primitives relying on refs (focus management, etc.) will malfunction.

Refactor with React.forwardRef:

-import type { ComponentProps } from 'react';
+import React, { type ComponentProps, type ForwardedRef } from 'react';

-function ContextMenu({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Root>) {
-  return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
-}
+const ContextMenu = React.forwardRef(
+  (
+    props: ComponentProps<typeof ContextMenuPrimitive.Root>,
+    ref: ForwardedRef<React.ElementRef<typeof ContextMenuPrimitive.Root>>,
+  ) => (
+    <ContextMenuPrimitive.Root ref={ref} data-slot="context-menu" {...props} />
+  ),
+);
+ContextMenu.displayName = ContextMenuPrimitive.Root.displayName;

Apply the same pattern to every other wrapper (Trigger, Content, Item, …) to preserve both type safety and runtime correctness.

Also applies to: 16-23, 24-30, 32-38, 40-44, 46-55, 57-79, 81-95, 97-113, 115-136, 138-162, 164-186, 188-206, 208-219, 221-232

🤖 Prompt for AI Agents
In apps/docs/components/ui/context-menu.tsx around lines 10 to 14, the
ContextMenu component does not forward refs, causing runtime errors despite the
ref prop being typed. Refactor the component to use React.forwardRef, accepting
props and ref as parameters, and pass the ref to ContextMenuPrimitive.Root.
Apply this pattern to all other wrapper components in the file at the specified
line ranges to ensure both type safety and correct runtime behavior.

@@ -1,3 +1,4 @@
// biome-ignore lint: false positive
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

'use client' directive appears to be missing – interactive component will render as a Server Component

This file contains Radix primitives and JSX with event-handling behaviour, which requires the component to be treated as a Client Component in the Next.js app router. With the new lint-ignore comment added, the 'use client' directive is no longer present. If it was inadvertently removed, the build will either fail or these interactions will break at runtime.

Proposed fix – re-insert the directive immediately after the ignore comment:

 // biome-ignore lint: false positive
+'use client';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// biome-ignore lint: false positive
// biome-ignore lint: false positive
'use client';
🤖 Prompt for AI Agents
In apps/docs/components/ui/navigation-menu.tsx at line 1, the 'use client'
directive is missing, which is necessary for this interactive component using
Radix primitives to function correctly as a Client Component in Next.js. To fix
this, re-insert the 'use client' directive immediately after the existing
biome-ignore lint comment at the top of the file to ensure proper client-side
rendering and event handling.

Comment on lines +6 to +15
import {
type ComponentProps,
type CSSProperties,
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

React namespace removed but still referenced later – build breaks

The import below drops the * as React namespace, yet the file still uses
React.ComponentProps and React.CSSProperties (e.g. lines 173, 272, 294, 207).
TypeScript will error: Cannot find namespace 'React'.

Either:

A. Re-introduce a type-only namespace import:

import type * as React from 'react';

B. Prefer the new style and update all remaining aliases:

-}: React.ComponentProps<'div'> & { ... }
+}: ComponentProps<'div'> & { ... }

(Do the same for every React.ComponentProps / React.CSSProperties occurrence.)

Failing to address this will block CI.

🤖 Prompt for AI Agents
In apps/docs/components/ui/sidebar.tsx around lines 6 to 15, the import
statement removed the React namespace but the code still references
React.ComponentProps and React.CSSProperties, causing TypeScript errors. To fix
this, either add a type-only namespace import like "import type * as React from
'react';" or update all occurrences of React.ComponentProps and
React.CSSProperties to use the directly imported types ComponentProps and
CSSProperties instead of the React namespace. Ensure all such references
throughout the file are updated accordingly to prevent build failures.

@@ -1,7 +1,8 @@
'use client';

// biome-ignore lint: false positive
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Verify biome lint ignore comments.

Both lint ignore comments lack specificity about which rules are being suppressed. Consider adding the specific rule names.

Also applies to: 57-57


🏁 Script executed:

#!/bin/bash
# Check what specific biome lint rules are being triggered
cd apps/docs
npx @biomejs/biome check components/ui/slider.tsx --verbose 2>&1 | grep -A 3 -B 3 "lint"

Length of output: 98


Specify biome lint rules in ignore comments

The two // biome-ignore lint: false positive comments suppress all linting without naming the specific rule. Either remove them if there’s no active lint issue, or replace them with the exact rule(s) you intend to suppress:

• apps/docs/components/ui/slider.tsx:3
• apps/docs/components/ui/slider.tsx:57

Example replacement:
// biome-ignore no-unused-vars [or the exact rule key]

🤖 Prompt for AI Agents
In apps/docs/components/ui/slider.tsx at lines 3 and 57, the biome lint ignore
comments currently suppress all linting without specifying the exact rule. To
fix this, identify the specific lint rule causing the false positive at these
lines and replace the generic comments with targeted ones like // biome-ignore
no-unused-vars or the exact rule key. If no lint issue exists, remove these
ignore comments entirely.

Comment on lines +109 to +178
function getFallbackEntries(): Array<{
url: string;
priority: number;
changeFrequency: 'weekly' | 'monthly' | 'yearly';
}> {
return [
{ url: '/docs', priority: 1.0, changeFrequency: 'weekly' },
{ url: '/docs/getting-started', priority: 0.9, changeFrequency: 'weekly' },
{ url: '/docs/sdk', priority: 0.9, changeFrequency: 'weekly' },
{
url: '/docs/domain-verification',
priority: 0.8,
changeFrequency: 'monthly',
},
{ url: '/docs/dashboard', priority: 0.8, changeFrequency: 'weekly' },
{ url: '/docs/security', priority: 0.8, changeFrequency: 'monthly' },
{ url: '/docs/api', priority: 0.7, changeFrequency: 'monthly' },
{ url: '/docs/Integrations', priority: 0.8, changeFrequency: 'weekly' },
{
url: '/docs/Integrations/react',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/nextjs',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/wordpress',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/shopify',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/stripe',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/framer',
priority: 0.7,
changeFrequency: 'weekly',
},
{ url: '/docs/Integrations/gtm', priority: 0.7, changeFrequency: 'weekly' },
{ url: '/privacy', priority: 0.5, changeFrequency: 'yearly' },
{ url: '/demo', priority: 0.6, changeFrequency: 'monthly' },
{ url: '/llms.txt', priority: 0.4, changeFrequency: 'weekly' },
];
}

function processFallbackEntries(
baseUrl: string,
lastModified: Date
): MetadataRoute.Sitemap {
const fallbackEntries = getFallbackEntries();
return fallbackEntries.map((entry) =>
createSitemapEntry(
entry.url,
baseUrl,
lastModified,
entry.priority,
entry.changeFrequency
)
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Good error handling strategy but eliminate data duplication.

The fallback entries provide excellent error resilience when dynamic page generation fails. However, there's significant duplication between these hardcoded entries and the earlier priorityMap/changeFrequencyMap definitions.

This duplication creates a maintenance burden. Consider consolidating into a single source of truth as suggested earlier, or at least derive the fallback entries from the existing maps:

function getFallbackEntries(): Array<{
  url: string;
  priority: number;
  changeFrequency: 'weekly' | 'monthly' | 'yearly';
}> {
-  return [
-    { url: '/docs', priority: 1.0, changeFrequency: 'weekly' },
-    // ... rest of hardcoded entries
-  ];
+  return Object.keys(priorityMap).map(url => ({
+    url,
+    priority: priorityMap[url],
+    changeFrequency: changeFrequencyMap[url],
+  }));
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function getFallbackEntries(): Array<{
url: string;
priority: number;
changeFrequency: 'weekly' | 'monthly' | 'yearly';
}> {
return [
{ url: '/docs', priority: 1.0, changeFrequency: 'weekly' },
{ url: '/docs/getting-started', priority: 0.9, changeFrequency: 'weekly' },
{ url: '/docs/sdk', priority: 0.9, changeFrequency: 'weekly' },
{
url: '/docs/domain-verification',
priority: 0.8,
changeFrequency: 'monthly',
},
{ url: '/docs/dashboard', priority: 0.8, changeFrequency: 'weekly' },
{ url: '/docs/security', priority: 0.8, changeFrequency: 'monthly' },
{ url: '/docs/api', priority: 0.7, changeFrequency: 'monthly' },
{ url: '/docs/Integrations', priority: 0.8, changeFrequency: 'weekly' },
{
url: '/docs/Integrations/react',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/nextjs',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/wordpress',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/shopify',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/stripe',
priority: 0.8,
changeFrequency: 'weekly',
},
{
url: '/docs/Integrations/framer',
priority: 0.7,
changeFrequency: 'weekly',
},
{ url: '/docs/Integrations/gtm', priority: 0.7, changeFrequency: 'weekly' },
{ url: '/privacy', priority: 0.5, changeFrequency: 'yearly' },
{ url: '/demo', priority: 0.6, changeFrequency: 'monthly' },
{ url: '/llms.txt', priority: 0.4, changeFrequency: 'weekly' },
];
}
function processFallbackEntries(
baseUrl: string,
lastModified: Date
): MetadataRoute.Sitemap {
const fallbackEntries = getFallbackEntries();
return fallbackEntries.map((entry) =>
createSitemapEntry(
entry.url,
baseUrl,
lastModified,
entry.priority,
entry.changeFrequency
)
);
}
function getFallbackEntries(): Array<{
url: string;
priority: number;
changeFrequency: 'weekly' | 'monthly' | 'yearly';
}> {
return Object.keys(priorityMap).map((url) => ({
url,
priority: priorityMap[url],
changeFrequency: changeFrequencyMap[url],
}));
}
🤖 Prompt for AI Agents
In apps/docs/lib/sitemap-generator.ts from lines 109 to 178, the fallback
entries are hardcoded and duplicate data already defined in the priorityMap and
changeFrequencyMap. To fix this, refactor getFallbackEntries to generate its
array by iterating over the keys of these existing maps, combining the URL paths
with their corresponding priority and changeFrequency values. This consolidation
removes duplication and ensures a single source of truth for these values.

Comment on lines +12 to +18
"suspicious": {
"noConsole": {
"options": {
"allow": ["assert", "error", "info", "warn"]
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Add an explicit level to the noConsole rule

Biome expects each rule object to specify a level ("off" | "warn" | "error") when you override defaults.
Without it, the final severity is inherited from the base config and can vary across environments, causing unexpected CI vs local differences.

 "noConsole": {
+  "level": "warn",
   "options": {
     "allow": ["assert", "error", "info", "warn"]
   }
 }

Let’s verify whether Biome requires an explicit level when overriding rules:


🌐 Web query:

Does Biome’s configuration require specifying a "level" when overriding a rule (e.g., noConsole) in biome.jsonc?

💡 Result:

When overriding a rule such as noConsole in the biome.jsonc configuration, you do need to specify a "level" (such as "error", "warn", or "off") if you want to change the severity of the rule in that override. This is consistent with how Biome expects rule options to be specified[3][4][8]. For example:

{
  "linter": {
    "rules": {
      "suspicious/noConsole": {
        "level": "error"
      }
    }
  },
  "overrides": [
    {
      "files": ["src/**/*.ts"],
      "linter": {
        "rules": {
          "suspicious/noConsole": {
            "level": "off"
          }
        }
      }
    }
  ]
}
  • The "level" property is required when you want to explicitly set the severity or disable the rule (by setting "level": "off")[3][4][8].
  • If you omit "level" in the override, Biome will use the default severity or whatever is set at the top level, and the override may have no effect[4].

This pattern applies to both top-level rules and those inside overrides, ensuring consistency in rule configuration regardless of nesting[1][6].

Caveat: If you use just "on" instead of a full object with "level", you will get the rule's default severity[4]. For maximum clarity and control, always specify "level" when overriding.

Conclusion:
Specifying "level" is required if you want to override the severity or disable a rule like noConsole in biome.jsonc[3][4][8].

Citations:


Add explicit level for noConsole in biome.jsonc

Biome requires an explicit level ("off" | "warn" | "error") when you override a rule’s defaults—otherwise it falls back to the base severity, which can differ between environments.

• File: biome.jsonc
• Location: within the suspicious.noConsole rule override (lines 12–18)

       "noConsole": {
+        "level": "warn",
         "options": {
           "allow": ["assert", "error", "info", "warn"]
         }
       }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"suspicious": {
"noConsole": {
"options": {
"allow": ["assert", "error", "info", "warn"]
}
}
}
"suspicious": {
"noConsole": {
"level": "warn",
"options": {
"allow": ["assert", "error", "info", "warn"]
}
}
}
🤖 Prompt for AI Agents
In biome.jsonc around lines 12 to 18, the noConsole rule override under
suspicious lacks an explicit level setting. Add a "level" property with a value
of "off", "warn", or "error" inside the noConsole rule configuration to
explicitly define its severity and avoid fallback to base severity.

@vercel
Copy link

vercel bot commented Jul 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 3:38pm

@izadoesdev izadoesdev merged commit 050a1e7 into databuddy-analytics:staging Jul 29, 2025
3 checks passed
@AyanavaKarmakar AyanavaKarmakar deleted the chore/lint-rule-fixes branch July 31, 2025 09:27
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