-
Notifications
You must be signed in to change notification settings - Fork 1
feat(biome-config): split React-specific rules into separate react.json config #579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…on config Co-authored-by: tutods <18479474+tutods@users.noreply.github.com>
Co-authored-by: tutods <18479474+tutods@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR successfully extracts React-specific linting rules from the base configuration into a separate react.json file, making the base config truly framework-agnostic. This improves separation of concerns and eliminates the need for non-React projects to explicitly disable React rules.
Key changes:
- Created new
react.jsonwith React-specific rules (useHookAtTopLevel,noUselessFragments,noLeakedRender,noDuplicatedSpreadProps, and JSX/TSX overrides) - Cleaned up
base.jsonby removing all React-specific rules and overrides - Updated
solidjs.jsonto remove unnecessaryuseHookAtTopLeveloverride
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
configs/biome-config/react.json |
New config file containing React-specific linting rules and JSX/TSX overrides |
configs/biome-config/base.json |
Removed React-specific rules to make config framework-agnostic |
configs/biome-config/solidjs.json |
Removed unnecessary React rule override |
configs/biome-config/nestjs.json |
Removed unnecessary React rule override |
configs/biome-config/package.json |
Added ./react export path |
configs/biome-config/README.md |
Updated documentation with React config usage examples and descriptions |
Comments suppressed due to low confidence (1)
configs/biome-config/nestjs.json:26
- The NestJS config still explicitly disables React-specific rules (noUselessFragments, noLeakedRender, noDuplicatedSpreadProps) that have been moved to react.json. Since these rules are no longer in base.json, these overrides are unnecessary and should be removed as part of this refactoring to maintain consistency with the PR's goal of eliminating React rule references from non-React configs.
"noUselessFragments": "off"
},
"style": {
"useImportType": "off"
},
"a11y": {
"recommended": false
},
"nursery": {
"noLeakedRender": "off",
"noDuplicatedSpreadProps": "off",
"noAmbiguousAnchorText": "off",
"useSortedClasses": "off"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **`base.json`**: stores the basic/global configuration with comprehensive linting rules for JavaScript/TypeScript projects; | ||
| - **`base.json`**: stores the basic/global configuration with comprehensive linting rules for JavaScript/TypeScript projects (framework-agnostic); | ||
| - **`react.json`**: extends base configuration with React-specific linting rules (hooks, fragments, etc.); | ||
| - **`nestjs.jsonc`:** extends base configuration for **Nest.js** projects (allowing decorators, etc.); |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file extension reference is inconsistent with the actual file. The text says "nestjs.jsonc" but the actual file is "nestjs.json" (without the 'c'). This should be corrected to match the actual filename.
| - **`nestjs.jsonc`:** extends base configuration for **Nest.js** projects (allowing decorators, etc.); | |
| - **`nestjs.json`:** extends base configuration for **Nest.js** projects (allowing decorators, etc.); |
Pull request
Description
Extracted React-specific linting rules from
base.jsoninto a newreact.jsonconfig. Base config is now framework-agnostic.Changes:
react.json- ContainsuseHookAtTopLevel,noUselessFragments,noLeakedRender,noDuplicatedSpreadProps, and JSX/TSX overrides fornoImplicitBooleanbase.json- Removed all React-specific rulesnestjs.json&solidjs.json- Removed unnecessaryuseHookAtTopLevel: "off"overridespackage.json- Added./reactexportREADME.md- Added React config documentation with usage examplesUsage:
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
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.