Skip to content

Commit 2e7a9f6

Browse files
committed
docs(README): add ESLint plugin instructions
1 parent 039e3f5 commit 2e7a9f6

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,21 @@ A state that only resolves after setting truthy values.
169169

170170
# Typescript
171171

172-
react-hook-utilities sees Typescript is a first-class citizen. The library is built for and around Typescript and you'll get bonus points for using it. Nonetheless, pure JavaScript files are also available if you're _that_ guy.
172+
**react-hook-utilities** sees Typescript is a first-class citizen. The library is built for and around Typescript and you'll get bonus points for using it. Nonetheless, pure JavaScript files are also available if you're _that_ guy.
173+
174+
# ESLint
175+
176+
If you're using ESLint and don't want to lose your errors and warnings regarding dependencies, **react-hook-utilities** comes packaged with an [ESLint plugin](eslint-plugin/README.md) to lint it's own hooks. It is recommended to install the plugin as a local dependency:
177+
178+
```sh
179+
$ yarn add -D ./node_modules/react-hook-utilities/eslint-plugin
180+
```
181+
182+
We recommend you read the [full documentation](eslint-plugin/README.md) on how to use the ESLint plugin
183+
184+
# Documentation
185+
186+
The documentation is available at: https://fjcaetano.github.com/react-hook-utilities
173187

174188
# [Full Documentation](https://fjcaetano.github.com/react-hook-utilities)
175189

eslint-plugin/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# @react-hook-utilities/eslint-plugin
22

3-
ESLint rules for hook utils
3+
ESLint rules for hook react-hook-utilities
44

55
## Installation
66

7-
You'll first need to install [ESLint](http://eslint.org):
7+
You'll first need to install [ESLint](http://eslint.org) and [react-hook-utilities](https://www.npmjs.com/package/react-hook-utilities)
88

99
```
10-
$ npm i eslint --save-dev
10+
$ npm i eslint react-hook-utilities --save-dev
1111
```
1212

13-
Next, install `@react-hook-utilities/eslint-plugin`:
13+
Next, install `@react-hook-utilities/eslint-plugin` directly from the host dependency:
1414

1515
```
16-
$ npm install @react-hook-utilities/eslint-plugin --save-dev
16+
$ npm install ./node_modules/react-hook-utilities/eslint-plugin --save-dev
1717
```
1818

19-
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `@react-hook-utilities/eslint-plugin` globally.
19+
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `react-hook-utilities` globally.
2020

2121
## Usage
2222

@@ -43,7 +43,7 @@ Then configure the rules you want to use under the rules section.
4343

4444
## Supported Rules
4545

46-
* Fill in provided rules here
46+
* exhaustive-deps: Ensures all hooks external references have been declared as dependencies.
4747

4848

4949

0 commit comments

Comments
 (0)