Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Aug 26, 2025

  • Remove deprecated component render functions (isFunctionOfRender, isRenderLike, isValidComponentDefinition)
  • Add new isComponentDefinition function for improved component detection
  • Reorganize lifecycle method detectors from functions to variables for consistency
  • Move React lifecycle methods (componentDidMount, componentWillUpdate, etc.) to variables namespace
  • Delete obsolete component-render.ts module
  • Enhance JSX detection with improved attribute handling and type checking
  • Update hook detection and hierarchy analysis
  • Improve JSX element classification and stringification
  • Add comprehensive documentation updates across all affected modules

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

- Remove deprecated component render functions (isFunctionOfRender, isRenderLike, isValidComponentDefinition)
- Add new isComponentDefinition function for improved component detection
- Reorganize lifecycle method detectors from functions to variables for consistency
- Move React lifecycle methods (componentDidMount, componentWillUpdate, etc.) to variables namespace
- Delete obsolete component-render.ts module
- Enhance JSX detection with improved attribute handling and type checking
- Update hook detection and hierarchy analysis
- Improve JSX element classification and stringification
- Add comprehensive documentation updates across all affected modules
@vercel
Copy link

vercel bot commented Aug 26, 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 Aug 26, 2025 11:37pm

@Rel1cx Rel1cx marked this pull request as ready for review August 26, 2025 23:31
@Rel1cx Rel1cx requested a review from Copilot August 26, 2025 23:31
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 restructures the component detection APIs to improve code organization and maintainability. It removes deprecated functions and consolidates functionality into more consistent patterns.

  • Replaces deprecated component render functions with new isComponentDefinition function
  • Converts individual lifecycle method functions to variables using a factory pattern
  • Removes the obsolete component-render.ts module entirely

Reviewed Changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/plugins/eslint-plugin-react-x/src/rules/no-nested-component-definitions.ts Updates function call from deprecated isRenderLike to new isRenderMethodLike
packages/core/src/utils/get-instance-id.ts Adds comprehensive documentation comments explaining the instance ID extraction logic
packages/core/src/jsx/*.ts Enhances JSX-related modules with detailed documentation and improved type checking
packages/core/src/hook/*.ts Adds documentation for hook detection and hierarchy analysis functions
packages/core/src/component/component-method.ts Refactors individual lifecycle method functions into variables using a factory pattern
packages/core/src/component/component-definition.ts Replaces isValidComponentDefinition with new isComponentDefinition function
packages/core/src/component/component-collector.ts Updates calls to use new isComponentDefinition function
packages/core/docs/*.md Updates documentation to reflect function-to-variable changes and new API structure
Comments suppressed due to low confidence (1)

packages/core/src/hook/hook-hierarchy.ts:1

  • [nitpick] The variable name pFunction is inconsistent with the comment that was removed which mentioned "Correctly named variable". The name should be more descriptive, such as parentFunction to match the naming pattern of pFunctionOfReturn.
import * as AST from "@eslint-react/ast";

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

@Rel1cx Rel1cx merged commit 3fe5aae into 2.0.0 Aug 26, 2025
9 of 10 checks passed
@Rel1cx Rel1cx deleted the refactor/component-detection-api branch August 26, 2025 23:37
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