Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Sep 30, 2025

I've unified the naming conventions by adding Jsx prefix to JSX-related functions and types, and improved consistency across the codebase.

Key changes:

  • Renamed getAttribute -> getJsxAttribute
  • Renamed hasAttribute -> hasJsxAttribute
  • Renamed isHostElement -> isJsxHostElement
  • Renamed isFragmentElement -> isJsxFragmentElement
  • Renamed getElementType -> getJsxElementType
  • Renamed getAttributeName -> getJsxAttributeName
  • Renamed AttributeValue -> JsxAttributeValue
  • Renamed JSXDetectionHint -> JsxDetectionHint

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 Sep 30, 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 Sep 30, 2025 8:41pm

@Rel1cx Rel1cx force-pushed the code-optimization-20 branch from 48ae14c to a1d31f1 Compare September 30, 2025 20:32
@Rel1cx Rel1cx marked this pull request as ready for review September 30, 2025 20:33
@Rel1cx Rel1cx requested a review from Copilot September 30, 2025 20:33
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 unifies JSX function naming conventions by adding a Jsx prefix to JSX-related functions and types for improved consistency across the codebase. Additionally, it adds performance optimizations through "fast path" checks for strings not present in source code.

  • Renamed JSX-related functions and types to include Jsx prefix for clarity and consistency
  • Optimized rule performance by adding fast-path checks to skip processing when target strings aren't in source code
  • Updated documentation files to reflect the new naming conventions

Reviewed Changes

Copilot reviewed 84 out of 84 changed files in this pull request and generated 5 comments.

File Description
packages/plugins/eslint-plugin/README.md Updates branch references in documentation links
Multiple rule files Updates function imports to use new Jsx-prefixed names and adds fast-path optimizations
packages/core/src/jsx/ Core JSX utility functions renamed with Jsx prefix and consolidated functionality
packages/core/docs/ Documentation updates to reflect new function and type names

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

I've unified the naming conventions by adding `Jsx` prefix to
JSX-related functions and types, and improved consistency across the
codebase.

Key changes: - Renamed `getAttribute` -> `getJsxAttribute` - Renamed
`hasAttribute` -> `hasJsxAttribute` - Renamed `isHostElement` ->
`isJsxHostElement` - Renamed `isFragmentElement` ->
`isJsxFragmentElement` - Renamed `getElementType` -> `getJsxElementType`
- Renamed `getAttributeName` -> `getJsxAttributeName` - Renamed
`AttributeValue` -> `JsxAttributeValue` - Renamed `JSXDetectionHint` ->
`JsxDetectionHint`
@Rel1cx Rel1cx force-pushed the code-optimization-20 branch from 6b4a494 to f3822d4 Compare September 30, 2025 20:35
@Rel1cx Rel1cx requested a review from Copilot September 30, 2025 20:36
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Rel1cx Rel1cx merged commit bdc2573 into main Sep 30, 2025
11 of 12 checks passed
@Rel1cx Rel1cx deleted the code-optimization-20 branch September 30, 2025 20:52
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