Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Jul 1, 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 Jul 1, 2025

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

Name Status Preview Comments Updated (UTC)
eslint-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 1:27am

@Rel1cx Rel1cx requested a review from Copilot July 1, 2025 01:25
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 refactors the boolean-type variant detection by replacing a switch (true) block with a clearer if/else structure.

  • Introduces boolean0 to hold the first boolean type and uses if/else in place of switch (true)
  • Adjusts the order of literal checks (falsy first, then truthy)
Comments suppressed due to low confidence (1)

packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts:114

  • The name boolean0 is not very descriptive. Consider renaming to firstBoolean or firstBooleanType for clarity.
  const boolean0 = booleans[0];

@Rel1cx Rel1cx merged commit 5a0f2c7 into main Jul 1, 2025
9 checks passed
@Rel1cx Rel1cx deleted the code-optimization-16 branch July 1, 2025 01:39
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