- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 29
 
Unify JSX function naming conventions and improve code consistency #1254
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
| 
           The latest updates on your projects. Learn more about Vercel for GitHub. 
  | 
    
48ae14c    to
    a1d31f1      
    Compare
  
    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 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 
Jsxprefix 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.
        
          
                packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-update.ts
          
            Show resolved
            Hide resolved
        
              
          
                packages/plugins/eslint-plugin-react-dom/src/rules/prefer-namespace-import.ts
          
            Show resolved
            Hide resolved
        
              
          
                packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts
              
                Outdated
          
            Show resolved
            Hide resolved
        
      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`
6b4a494    to
    f3822d4      
    Compare
  
    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
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.
I've unified the naming conventions by adding
Jsxprefix to JSX-related functions and types, and improved consistency across the codebase.Key changes:
getAttribute->getJsxAttributehasAttribute->hasJsxAttributeisHostElement->isJsxHostElementisFragmentElement->isJsxFragmentElementgetElementType->getJsxElementTypegetAttributeName->getJsxAttributeNameAttributeValue->JsxAttributeValueJSXDetectionHint->JsxDetectionHintWhat kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___)Other information