Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Dec 3, 2025

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Test
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • I have added a convincing reason for adding this feature, if necessary

Other information

@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
eslint-react Ready Ready Preview Comment Dec 3, 2025 7:39am

Copy link
Contributor

Copilot AI left a 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 adds an allowEmptyFragment option to the no-useless-fragment ESLint rule, addressing issue #1265. The option allows developers to suppress warnings for empty fragments (<></>) when they are intentionally used (e.g., as placeholders or for type compatibility).

Key Changes:

  • Added allowEmptyFragment boolean option (default: false) to the rule schema
  • Refactored the rule implementation by moving helper functions inside the create function to access the new option
  • Updated message ID from string literal to computed type using CamelCase helper for consistency
  • Updated documentation links from main to stable branch

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/plugins/eslint-plugin/README.md Updated contributing and license documentation links from main to stable branch
packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.ts Added allowEmptyFragment option, refactored helper functions as closures, and updated message ID to use computed type
packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.spec.ts Updated all test cases to use new noUselessFragment message ID and added tests for the new option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rel1cx Rel1cx force-pushed the no-useless-fragment branch from 2ddbbd9 to da1f8a3 Compare December 3, 2025 07:36
@Rel1cx Rel1cx merged commit 45ad42e into main Dec 3, 2025
11 of 12 checks passed
@Rel1cx Rel1cx deleted the no-useless-fragment branch December 3, 2025 07:38
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