Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 20, 2025

Pull request

Description

Extracted React-specific linting rules from base.json into a new react.json config. Base config is now framework-agnostic.

Changes:

  • Created react.json - Contains useHookAtTopLevel, noUselessFragments, noLeakedRender, noDuplicatedSpreadProps, and JSX/TSX overrides for noImplicitBoolean
  • Updated base.json - Removed all React-specific rules
  • Updated nestjs.json & solidjs.json - Removed unnecessary useHookAtTopLevel: "off" overrides
  • Updated package.json - Added ./react export
  • Updated README.md - Added React config documentation with usage examples

Usage:

// React project
{
  "extends": [
    "@tutods/biome-config",
    "@tutods/biome-config/react"
  ]
}

// Next.js project
{
  "extends": [
    "@tutods/biome-config",
    "@tutods/biome-config/react",
    "@tutods/biome-config/nextjs"
  ]
}

// NestJS project (no React rules)
{
  "extends": [
    "@tutods/biome-config",
    "@tutods/biome-config/nestjs"
  ]
}

Motivation and Context

Base config included React-specific rules, forcing non-React projects (NestJS, SolidJS) to explicitly disable them. This creates redundancy and violates separation of concerns.

References

N/A

Types of changes

  • Breaking change (a fix or feature that would cause existing functionality to change)
  • Bugfix (a non-breaking change that fixes an issue)
  • Chore (a task that doesn't add or fix existing code or tests)
  • New feature (a non-breaking change that adds functionality)
  • Performance (a non-breaking change that reduces time or space complexity of a flow)
  • Refactor (a non-breaking change that restructures existing code)
  • Test (added or updated existing tests without implementation changes)
Original prompt

This section details on the original issue you should resolve

<issue_title>Split React-specific rules out of base.json config and reorganize config structure</issue_title>
<issue_description>### Problem
Currently, base.json includes both common and React-specific rules. This creates confusion and forces non-React projects to inherit React-specific linting rules, requiring other configs to explicitly disable them.

Current Issues in Code

In configs/biome-config/base. json:

"correctness": {
  "recommended": true,
  "useHookAtTopLevel": "error",  // React-specific rule
  // ... other rules
}

Framework configs disabling React rules:

nestjs.json:

"correctness": {
  "useHookAtTopLevel": "off"  // Disabling React rule
}

solidjs.json:

"correctness": {
  "useHookAtTopLevel": "off"  // Disabling React rule
}

Proposal

  1. Split base.json:

    • Move React-specific rules (useHookAtTopLevel, etc.) out of base.json
    • Keep only framework-agnostic rules in base config
  2. Create react.json:

    • New config file containing React-specific linting rules
    • Should extend base. json and add React-specific rules
  3. Update existing configs:

    • Remove rule disabling from nestjs.json and solidjs.json
    • Update nextjs.json to properly extend both base and React configs
    • Update documentation and package.json exports

Motivation

  • Cleaner separation: Base config should be truly framework-agnostic
  • Reduced redundancy: No need to disable React rules in non-React projects
  • Better composition: Users can combine base + React as needed
  • Improved maintainability: Changes to React rules only affect React config

Acceptance Criteria

  • base.json contains only generic (non-React) rules
  • New react.json contains React-specific rules (like useHookAtTopLevel)
  • nestjs.json and solidjs.json no longer disable React rules
  • nextjs.json properly extends base and React configs
  • Package.json exports updated to include ./react
  • Documentation updated with new React config usage examples
  • All existing functionality preserved

Files to be modified:

  • configs/biome-config/base.json
  • configs/biome-config/nestjs.json
  • configs/biome-config/solidjs.json
  • configs/biome-config/nextjs.json
  • configs/biome-config/package.json
  • configs/biome-config/README.md

New file to create:

  • configs/biome-config/react.json</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 20, 2025 18:41
…on config

Co-authored-by: tutods <18479474+tutods@users.noreply.github.com>
Co-authored-by: tutods <18479474+tutods@users.noreply.github.com>
Copilot AI changed the title [WIP] Split React-specific rules out of base.json config feat(biome-config): split React-specific rules into separate react.json config Dec 20, 2025
Copilot AI requested a review from tutods December 20, 2025 18:44
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.

Split React-specific rules out of base.json config and reorganize config structure

2 participants