v0.1.0
eslint-plugin-strict-hooks
π v0.1.0 β Initial Release
Adds a new ESLint rule to enforce meaningful comments when disabling react-hooks/exhaustive-deps.
β
 New Rule: require-exhaustive-deps-comment
This rule ensures developers explicitly mention which dependencies are intentionally omitted from the dependency array when disabling react-hooks/exhaustive-deps.
π§ Valid Example
useEffect(() => {
  fetchData();
}, []); // eslint-disable-line react-hooks/exhaustive-deps -- fetchData: memoizedβ Invalid Example
useEffect(() => {
  fetchData();
}, []); // eslint-disable-line react-hooks/exhaustive-depsπ― What it Detects
- β Dependencies used but not mentioned in the disable comment
- β Stale entries: variables mentioned in the comment that are no longer used
- β
 Empty --comment when dependencies are omitted
π§ Configurable Options
rules: {
  "strict-hooks/require-exhaustive-deps-comment": ["warn", {
    enabledHooks: ["useEffect", "useMemo", "useCallback"],
    requireCommentPerDependency: true,
    disabledHooks: []
  }]
}π§ Limitations
- No autofix (yet)
- Does not support destructured/memoized property tracking
- Does not resolve shadowed identifiers
Full Changelog: https://github.com/sathvikc/eslint-plugin-strict-hooks/commits/v0.1.0