[Bug]: eslint-plugin-react-hooks documentation says that 2 rules are recommended and all others are opt-in but that's not true
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Vergleiche die Dokumentation von eslint-plugin-react-hooks unter react.dev/reference/eslint-plugin-react-hooks mit der referenzierten Konfiguration in packages/eslint-plugin-react-hooks/src/index.ts um die Zeilen 49-52. Bestimme, ob die empfohlene Konfiguration oder die Dokumentation inkonsistent ist, aktualisiere anschließend die relevante Quelle und verifiziere, dass das dokumentierte Regelverhalten mit der Konfiguration übereinstimmt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- eslint, javascript, react
- Bereich
- documentation, tooling
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100