-
-
Notifications
You must be signed in to change notification settings - Fork 29
Merge 2.0.0 into main, closes #335 #1238
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
…d improve validation (#1185) Signed-off-by: REL1CX <[email protected]> Co-authored-by: Copilot <[email protected]>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 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
totsdown
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.
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts
Show resolved
Hide resolved
packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts
Show resolved
Hide resolved
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 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.
packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts
Show resolved
Hide resolved
packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts
Show resolved
Hide resolved
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 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.
packages/plugins/eslint-plugin-react-x/src/rules/no-unused-props.spec.ts
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]> Signed-off-by: REL1CX <[email protected]>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
v2.0.0 (TBD)
💥 Breaking Changes
Target Environment Updates: Now ESM and ESLint Flat Config Only
eslint.config.js
)Removed Rules
react-x/jsx-shorthand-boolean
react-x/jsx-shorthand-fragment
react-x/no-useless-forward-ref
react-x/jsx-no-duplicate-props
react-x/jsx-no-comment-textnodes
react-x/no-nested-component-definitions
react-x/prefer-namespace-import
react-x/jsx-shorthand-boolean
react-x/jsx-shorthand-fragment
react-x/jsx-uses-vars
react-dom/no-void-elements-with-children
react-hooks-extra/no-direct-set-state-in-use-effect
react-x/no-unnecessary-use-callback
react-x/no-unnecessary-use-memo
react-x/no-unnecessary-use-prefix
react-x/prefer-use-state-lazy-initialization
Removed Presets
core
x
core-legacy
off-dom
disable-dom
off-dom-legacy
x-legacy
dom-legacy
web-api-legacy
recommended-legacy
recommended-typescript-legacy
recommended-type-checked-legacy
Removed Settings
additionalComponents
additionalHooks
skipImportCheck
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 attributesreact-x/jsx-shorthand-fragment
: Enforces a consistent style for React Fragmentsreact-x/no-forbidden-props
: Disallows specific props on componentsreact-x/no-unnecessary-key
: Reports unnecessarykey
props on elementsreact-x/no-unused-props
: Reports unused props in componentsreact-dom/no-string-style-prop
: Disallows string values for thestyle
propreact-dom/prefer-namespace-import
: Enforces using a namespace import forreact-dom
Added the following new rule to the
recommended-type-checked
preset:react-x/no-unused-props
: Reports unused props in componentsThe 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 ineslint-plugin-react
that conflict with rules in our plugins🐞 Fixes
vi.mock(...)
in Vitest test filesuseEffect
setup function check to handleReact.useEffect()
calls correctly404.tsx
,_app.tsx
,[slug].tsx
🪄 Improvements
eslint-plugin-react
andeslint-react
rulestseslint.config
withdefineConfig
in all examplestsup
totsdown
for better performanceFull Changelog: v1.53.1...v2.0.0