Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Sep 5, 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 Sep 5, 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 5, 2025 4:04pm

@Rel1cx Rel1cx requested a review from Copilot September 5, 2025 16:02
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 enhances the dom/no-string-style-prop ESLint rule to support custom components and improve attribute resolution. The rule now uses a more sophisticated JSX element resolver instead of a simple JSX attribute visitor, enabling better handling of custom components with style attributes.

Key changes:

  • Replace simple JSXAttribute visitor with JSXElement visitor using new resolver utilities
  • Add support for custom components through createJsxElementResolver and resolveAttribute functions
  • Remove custom getAttributeValueText function in favor of the shared utility

Reviewed Changes

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

File Description
no-string-style-prop.ts Refactored rule implementation to use new resolver utilities for better attribute resolution
no-string-style-prop.spec.ts Added test case for custom component with style attribute that should be allowed

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

@Rel1cx
Copy link
Owner Author

Rel1cx commented Sep 5, 2025

Support #1217 by utilizing the existing additionalComponents configuration.

@Rel1cx Rel1cx merged commit fd2c981 into 2.0.0 Sep 5, 2025
10 checks passed
@Rel1cx Rel1cx deleted the feat/no-string-style-prop branch September 6, 2025 01:00
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