Skip to content

Conversation

Rel1cx
Copy link
Owner

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

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

v2.0.0 (TBD)

💥 Breaking Changes

Target Environment Updates: Now ESM and ESLint Flat Config Only

  • Drop support for CommonJS (CJS) module format, packages are now distributed only as ECMAScript Modules (ESM)
  • Drop support for ESLint legacy config system, packages now support only ESLint Flat Config (eslint.config.js)
  • Drop support for Node.js 16 and 18, minimum required version is now Node.js 20
  • Drop support for ESLint 8, minimum required version is now ESLint 9.3.6
  • Drop support for TypeScript 4, minimum required version is now TypeScript 5.9.2

Removed Rules

Rule Replaced by Reason
react-x/avoid-shorthand-boolean react-x/jsx-shorthand-boolean consolidated
react-x/avoid-shorthand-fragment react-x/jsx-shorthand-fragment consolidated
react-x/ensure-forward-ref-using-ref react-x/no-useless-forward-ref renamed
react-x/jsx-no-duplicate-props react-x/jsx-no-duplicate-props renamed
react-x/no-comment-textnodes react-x/jsx-no-comment-textnodes renamed
react-x/no-complicated-conditional-rendering discontinued
react-x/no-nested-components react-x/no-nested-component-definitions renamed
react-x/prefer-react-namespace-import react-x/prefer-namespace-import renamed
react-x/prefer-shorthand-boolean react-x/jsx-shorthand-boolean consolidated
react-x/prefer-shorthand-fragment react-x/jsx-shorthand-fragment consolidated
react-x/use-jsx-vars react-x/jsx-uses-vars renamed
react-dom/no-children-in-void-dom-elements react-dom/no-void-elements-with-children renamed
react-hooks-extra/no-direct-set-state-in-use-layout-effect react-hooks-extra/no-direct-set-state-in-use-effect consolidated
react-hooks-extra/no-unnecessary-use-callback react-x/no-unnecessary-use-callback relocated
react-hooks-extra/no-unnecessary-use-memo react-x/no-unnecessary-use-memo relocated
react-hooks-extra/no-unnecessary-use-prefix react-x/no-unnecessary-use-prefix relocated
react-hooks-extra/prefer-use-state-lazy-initialization react-x/prefer-use-state-lazy-initialization relocated

Removed Presets

Preset Replaced by Reason
core x renamed
core-legacy discontinued
off-dom disable-dom renamed
off-dom-legacy discontinued
x-legacy discontinued
dom-legacy discontinued
web-api-legacy discontinued
recommended-legacy discontinued
recommended-typescript-legacy discontinued
recommended-type-checked-legacy discontinued

Removed Settings

Setting Replaced by Reason
additionalComponents discontinued
additionalHooks discontinued
skipImportCheck discontinued

The rule implementations have been refactored to improve performance and maintainability.

✨ New

Added the following new rules:

  • react-x/jsx-shorthand-boolean: Enforces a consistent style for boolean attributes
  • react-x/jsx-shorthand-fragment: Enforces a consistent style for React Fragments
  • react-x/no-forbidden-props: Disallows specific props on components
  • react-x/no-unnecessary-key: Reports unnecessary key props on elements
  • react-x/no-unused-props: Reports unused props in components
  • react-dom/no-string-style-prop: Disallows string values for the style prop
  • react-dom/prefer-namespace-import: Enforces using a namespace import for react-dom

Added the following new rule to the recommended-type-checked preset:

  • react-x/no-unused-props: Reports unused props in components

The following rules now support Codemod features:

  • react-x/no-component-did-update
  • react-x/no-component-will-receive-props
  • react-x/no-component-will-update
  • react-x/no-context-provider
  • react-x/no-forward-ref
  • react-x/no-string-refs

The following rules now support auto-fix:

  • react-x/prefer-namespace-import
  • react-dom/prefer-namespace-import

The following rules now support suggestion fixes:

  • react-dom/no-missing-button-type
  • react-dom/no-missing-iframe-sandbox
  • react-dom/no-unsafe-target-blank

New configuration preset added:

  • disable-conflict-eslint-plugin-react: Disable rules in eslint-plugin-react that conflict with rules in our plugins

🐞 Fixes

  • fix(react-x/no-unnecessary-use-prefix): fix false positive of React Hooks defined within the callback function of vi.mock(...) in Vitest test files
  • fix(react-web-api/no-leaked-event-listener): fix useEffect setup function check to handle React.useEffect() calls correctly
  • fix(react-naming-convention/filename): fix false positive on well-known filenames like 404.tsx, _app.tsx, [slug].tsx

🪄 Improvements

  • refactor: simplify React APIs detection logic
  • refactor: cleanup utilities and simplify rule implementations
  • docs: add comparison table between eslint-plugin-react and eslint-react rules
  • docs: replace tseslint.config with defineConfig in all examples
  • build: migrate build system from tsup to tsdown for better performance

Full Changelog: v1.53.1...v2.0.0

Rel1cx and others added 30 commits August 17, 2025 20:20
…d improve validation (#1185)

Signed-off-by: REL1CX <[email protected]>
Co-authored-by: Copilot <[email protected]>
@vercel
Copy link

vercel bot commented Sep 24, 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 25, 2025 10:10pm

@Rel1cx Rel1cx requested a review from Copilot September 24, 2025 21:21
Copy link
Contributor

@Copilot 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 pull request merges version 2.0.0 into main, representing a major version bump with significant breaking changes and new features. The update introduces ESM-only distribution, updates minimum system requirements, and consolidates multiple rule changes.

Key changes include:

  • Migrated to ESM-only packages with updated Node.js (20.19.0), ESLint (9.36.0), and TypeScript (5.9.2) requirements
  • Added new rules and consolidated existing ones with improved functionality
  • Removed legacy CommonJS support and updated build tooling from tsup to tsdown

Reviewed Changes

Copilot reviewed 224 out of 717 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.spec.ts New test file for rule that disallows string values for style prop
packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.mdx Documentation for new no-string-style-prop rule
packages/plugins/eslint-plugin-react-dom/src/rules/no-script-url.ts Refactored to use new kit utilities and updated imports
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts Enhanced with suggestion fixes and improved error handling
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts Added suggestion fixes for button type attribute
packages/plugins/eslint-plugin-react-dom/src/plugin.ts Updated plugin structure and removed deprecated rules
packages/plugins/eslint-plugin-react-dom/package.json Updated to ESM-only with version bump and dependency updates
packages/core/src/jsx/jsx-config.ts Consolidated JSX configuration utilities with improved documentation
packages/core/src/jsx/jsx-attribute-value.ts Complete rewrite of attribute value resolution system
package.json Version bump and updated tooling dependencies

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

@socket-security
Copy link

socket-security bot commented Sep 25, 2025

Copy link
Contributor

@Copilot 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 297 out of 492 changed files in this pull request and generated 6 comments.


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

@Rel1cx Rel1cx requested a review from Copilot September 25, 2025 21:54
Copy link
Contributor

@Copilot 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 297 out of 493 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 marked this pull request as ready for review September 25, 2025 21:55
@Rel1cx Rel1cx merged commit 53e7266 into main Sep 25, 2025
19 checks passed
@Rel1cx Rel1cx deleted the 2.0.0 branch September 25, 2025 22:51
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.

3 participants