-
-
Notifications
You must be signed in to change notification settings - Fork 32
refactor: rework hooks rules #1225
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…y-use-callback.ts Co-authored-by: Copilot <[email protected]> Signed-off-by: REL1CX <[email protected]>
…direct-set-state-in-use-effect.ts Co-authored-by: Copilot <[email protected]> Signed-off-by: REL1CX <[email protected]>
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 PR refactors the hooks rules system by removing support for custom hook aliases and simplifying the core hook detection logic. The changes focus on standardizing hook detection to use built-in React hooks only.
- Removes the
additionalHooksconfiguration and related schemas from settings - Refactors hook detection functions to remove context dependencies and alias support
- Removes deprecated rules and consolidates hook-related functionality
Reviewed Changes
Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/settings.ts | Removes custom hooks schema and settings configuration |
| packages/core/src/hook/hook-is.ts | Simplifies hook detection by removing context and alias support |
| packages/plugins/eslint-plugin-react-x/src/rules/*.ts | Updates rules to use simplified hook detection |
| packages/plugins/eslint-plugin-react-hooks-extra/src/rules/*.ts | Removes deprecated rules and updates remaining ones |
| packages/plugins/eslint-plugin-react-hooks-extra/src/plugin.ts | Removes deprecated rule exports |
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.
packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts
Show resolved
Hide resolved
packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts
Show resolved
Hide resolved
4de913a to
66608f5
Compare
66608f5 to
50cada0
Compare
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___)Other information