File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ This package is a no-op ppx rewriter. It is used as a 'lint' to
33enforce the rules of React hooks.
44
55- [x] Exhaustive dependencies in useEffect
6- - [x] Only Call Hooks at the Top Level
7- - [x] Hooks shoudn't be called in different order
6+ - [x] Order of Hooks
7+ - [x] Hooks shoudn't be called in different order
8+ - [x] Only Call Hooks at the Top Level
89
910Read more about the [ Rules of Hooks] ( https://en.reactjs.org/docs/hooks-rules.html )
1011
@@ -29,6 +30,22 @@ Add the ppx on the BuckleScript config (`bsconfig.json`)
2930]
3031```
3132
33+ You can disable globally both rules passing parameters to the ppx:
34+
35+ #### Disable "Exhaustive dependencies in useEffect"
36+ ``` json
37+ "ppx-flags" : [
38+ [" react-rules-of-hooks-ppx/Bin.exe" , " -exhaustive-deps" ]
39+ ]
40+ ```
41+
42+ #### Disable "Order of Hooks"
43+ ``` json
44+ "ppx-flags" : [
45+ [" react-rules-of-hooks-ppx/Bin.exe" , " -order-of-hooks" ]
46+ ]
47+ ```
48+
3249## Issues
3350Feel free to use it and report any unexpected behaviour in the [ issue section] ( https://github.com/reason-in-barcelona/react-rules-of-hooks-ppx/issues )
3451
You can’t perform that action at this time.
0 commit comments