Skip to content
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

[Request] support eslint-plugin-react-hooks #3

Closed
dayuy opened this issue Apr 30, 2024 · 3 comments
Closed

[Request] support eslint-plugin-react-hooks #3

dayuy opened this issue Apr 30, 2024 · 3 comments
Labels

Comments

@dayuy
Copy link

dayuy commented Apr 30, 2024

🥰 需求描述 | Feature Description

EsLint 希望支持 React Hooks,参考 Linting

🧐 解决方案 | Proposed Solution

  1. pnpm install eslint-plugin-react-hooks -D
  2. .eslintrc.js
{
  "plugins": [
    // ...
    "react-hooks"
  ],
  "rules": {
    // ...
    "react-hooks/rules-of-hooks": "error", // 检查 Hook 的规则
    "react-hooks/exhaustive-deps": "warn" // 检查 effect 的依赖
  }
}

📝 补充信息 | Additional Information

No response

@yunti-bot
Copy link
Collaborator

👀 @dayuy
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@Carrotzpc
Copy link
Member

Carrotzpc commented Jun 4, 2024

fixed in f52c00e, and released in @yuntijs/[email protected]

@yunti-bot
Copy link
Collaborator

@dayuy


This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants