Skip to content

Commit

Permalink
docs(README): add ESLint plugin instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
fjcaetano committed Feb 18, 2020
1 parent 2863ec4 commit d2dbb80
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,21 @@ A state that only resolves after setting truthy values.

# Typescript

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.
**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.

# ESLint

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:

```sh
$ yarn add -D ./node_modules/react-hook-utilities/eslint-plugin
```

We recommend you read the [full documentation](eslint-plugin/README.md) on how to use the ESLint plugin

# Documentation

The documentation is available at: https://fjcaetano.github.com/react-hook-utilities

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

Expand Down
14 changes: 7 additions & 7 deletions eslint-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# @react-hook-utilities/eslint-plugin

ESLint rules for hook utils
ESLint rules for hook react-hook-utilities

## Installation

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

```
$ npm i eslint --save-dev
$ npm i eslint react-hook-utilities --save-dev
```

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

```
$ npm install @react-hook-utilities/eslint-plugin --save-dev
$ npm install ./node_modules/react-hook-utilities/eslint-plugin --save-dev
```

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

## Usage

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

## Supported Rules

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



Expand Down

0 comments on commit d2dbb80

Please sign in to comment.