[Bug]: eslint-plugin-react-hooks documentation says that 2 rules are recommended and all others are opt-in but that's not true
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 11
描述
Summary
https://react.dev/reference/eslint-plugin-react-hooks says:
Starting in version 6.0, these rules are available to opt-in:
...
According to that page only exhaustive-deps and rules-of-hooks are recommended.
But if you look are the source code for 7.0, you can see that extending configs.flat.recommended will more or less enable ALL the rules, including the ones related to the compiler:
Either the documentation needs to be updated or there is a bug in eslint-plugin-react-hooks where the recommended flat configs enabled too many rules. I am not in a position to decide who is wrong here :).
Page
https://react.dev/reference/eslint-plugin-react-hooks
Details
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
将 react.dev/reference/eslint-plugin-react-hooks 上的 eslint-plugin-react-hooks 文档与 packages/eslint-plugin-react-hooks/src/index.ts 中第 49-52 行附近引用的配置进行比较。确定推荐配置或文档是否存在不一致,然后更新相关源代码,并验证文档中描述的规则行为与配置相匹配。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- eslint, javascript, react
- 领域
- documentation, tooling
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100