Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Sep 30, 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

…-trivial expression as value of type attribute, closes #1247
@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 Building Building Preview Comment Sep 30, 2025 4:13am

@Rel1cx Rel1cx requested a review from Copilot September 30, 2025 04:13
@Rel1cx Rel1cx marked this pull request as ready for review September 30, 2025 04:13
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 fixes a false positive in the dom/no-missing-button-type rule when non-trivial expressions are used as the value of the type attribute. The rule previously reported errors for dynamic type values like variables or expressions, even when they were valid.

  • Simplified the rule logic to only check for the presence of a type attribute
  • Removed complex static value resolution that was causing false positives
  • Added comprehensive test cases for dynamic type attribute scenarios

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.

File Description
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts Simplified rule implementation by removing static value resolution
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.spec.ts Updated tests by removing invalid test case and adding valid dynamic type scenarios
Multiple package.json files Updated TypeScript ESLint dependencies from 8.44.1 to 8.45.0
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@Rel1cx Rel1cx merged commit 1a403ef into main Sep 30, 2025
11 of 12 checks passed
@Rel1cx Rel1cx deleted the fix-dom-no-missing-button-type branch September 30, 2025 20:53
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