reactjs / reactjs/react.dev

How to configure `eslint-plugin-react-hooks` in `eslint.config.js`

未關閉
#6,430 2 則留言 8 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
11.8k
分支
7.9k
平均合併
1 天 11 小時
30 天內合併 PR
11

描述

Starting with the next version 9, ESLint will deprecate the current eslintrc format and will default use the new flat config format (eslint.config.js). Already from version 8.2.23 you can fully use the flat config format. Still, neither the README (which is used as a description for the NPM package) nor the documentation says anything about how to configure it correctly. And also no one answered the question on StackOverflow about this. Please add this information to the documentation.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先檢視 eslint-plugin-react-hooks 的 README,以及 issue 中連結的 legacy Hooks rules 文件,然後根據 ESLint 的設定文件核對 flat-config 指南。使用正確的 eslint.config.js 設定更新文件,包括如何設定 plugin 及其 rules,並確認兩個被參照的文件位置都清楚說明了這一點。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
eslint, javascript, react
領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。