Skip to content

Commit 7d35da6

Browse files
committed
docs: Add arguments
1 parent c912ad0 commit 7d35da6

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ This package is a no-op ppx rewriter. It is used as a 'lint' to
33
enforce 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

910
Read 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
3350
Feel 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

0 commit comments

Comments
 (0)