Skip to content

Releases: ml-in-barcelona/react-rules-of-hooks-ppx

1.2.0

18 Feb 14:12

Choose a tag to compare

CHANGES:

  • [FEAT] Support use + numbers as a valid hook name
  • [FIX] Outer scope bindings (module-level values and functions) no longer trigger missing dependency warnings in exhaustive deps checks

1.1.0

04 Feb 17:31

Choose a tag to compare

CHANGES:

  • [FEAT] Disable order of hooks attribute [@disable_order_of_hooks]
  • [CHORE] Add mlx as :with-test and :with-dev-setup (previously only :with-dev-setup)
  • [FIX] Add support for snake_case hooks (use_state, use_effect, use_custom_hook)
  • [FIX] SVG <use> element no longer incorrectly flagged as a hook (JSX elements excluded from hook detection)
  • [FIX] False positive when multiple hooks are defined
  • [FIX] Hooks name can be "use"
  • [FIX] Fix static deps scope leaking between components (useState setters, useReducer dispatchers, useRef results now properly scoped per component)
  • [FIX] JSX context reset bug where multiple hooks in the same JSX element weren't all flagged as violations
  • [FEAT] Add Pexp_letop support for monadic let+/and+ syntax in exhaustive deps checking
  • [TEST] Add test cases inspired by React's eslint-plugin-react-hooks
  • [FEAT] Add REACT_HOOKS_PPX_TIMING env var to print timing diagnostics
  • [FIX] Use Set for O(log n) lookups, single-pass AST analysis, caching
  • [FIX] Simplify diff function
  • [FIX] Replace List.length > 0 with <> []
  • [FIX] Optimize find_duplicates to deduplicate during traversal

1.0.0

27 Jan 15:21
68c568b

Choose a tag to compare

CHANGES

  • Detect hooks called conditionally, in loops, or in nested functions
  • Detect hooks called outside of [@react.component] functions or custom hooks
  • Check exhaustive dependencies in useEffect, useMemo, useCallback, useLayoutEffect, and useInsertionEffect
  • Disable order of hooks check globally with -order-of-hooks ppx flag
  • Disable exhaustive deps check globally with -exhaustive-deps ppx flag
  • Suppress exhaustive deps warning locally with [@disable_exhaustive_deps] attribute
  • -corrections flag to generate .ppx-corrected files with suggested fixes for missing dependencies
  • Improve -corrections according to the reason-react interface

Release bc7cc97

10 May 16:00

Choose a tag to compare

Release c912ad0

19 Oct 10:02

Choose a tag to compare

Release a567efe

19 Oct 10:23

Choose a tag to compare

Release a2fba4d

15 Oct 07:05

Choose a tag to compare

Release refs/pull/1/merge

27 Sep 14:20
59b20ba

Choose a tag to compare

Merge 59d8db1b1dc9c611a395bcba52e933cb0e8b20c9 into 935d0412a817ea6b5…

Release fd62b4b

27 Sep 15:15

Choose a tag to compare

ci: Publish nighly all the time

Release f9cc4a4

27 Sep 16:58

Choose a tag to compare