Releases: ml-in-barcelona/react-rules-of-hooks-ppx
Releases · ml-in-barcelona/react-rules-of-hooks-ppx
1.2.0
1.1.0
CHANGES:
- [FEAT] Disable order of hooks attribute
[@disable_order_of_hooks] - [CHORE] Add mlx as
:with-testand: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_letopsupport for monadiclet+/and+syntax in exhaustive deps checking - [TEST] Add test cases inspired by React's eslint-plugin-react-hooks
- [FEAT] Add
REACT_HOOKS_PPX_TIMINGenv 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 > 0with<> [] - [FIX] Optimize
find_duplicatesto deduplicate during traversal
1.0.0
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, anduseInsertionEffect - Disable order of hooks check globally with
-order-of-hooksppx flag - Disable exhaustive deps check globally with
-exhaustive-depsppx flag - Suppress exhaustive deps warning locally with
[@disable_exhaustive_deps]attribute -correctionsflag to generate.ppx-correctedfiles with suggested fixes for missing dependencies- Improve
-correctionsaccording to the reason-react interface
Release bc7cc97
0.9.1
Release c912ad0
0.8.0
Release a567efe
0.8.1
Release a2fba4d
0.4.0
Release refs/pull/1/merge
Merge 59d8db1b1dc9c611a395bcba52e933cb0e8b20c9 into 935d0412a817ea6b5…
Release fd62b4b
ci: Publish nighly all the time
Release f9cc4a4
0.2.2