# eslint-plugin-baitshop-hooks

> ESLint rules for React Hooks with support for Baitshop hooks

Latest version **1.0.2** (published 2020-06-24) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-baitshop-hooks
pnpm add eslint-plugin-baitshop-hooks
yarn add eslint-plugin-baitshop-hooks
bun add eslint-plugin-baitshop-hooks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-06-24 |
| First published | 2020-06-11 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 26.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | aarongoin |
| Keywords | eslint, eslint-plugin, eslintplugin, react, baitshop |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-baitshop-hooks
- Repository: https://github.com/aarongoin/eslint-plugin-baitshop-hooks
- Homepage: https://github.com/aarongoin/eslint-plugin-baitshop-hooks#readme
- Issues: https://github.com/aarongoin/eslint-plugin-baitshop-hooks/issues
- npm.io page: https://npm.io/package/eslint-plugin-baitshop-hooks

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-06-24
- 1.0.1 — 2020-06-11
- 1.0.0 — 2020-06-11

## README

# eslint-plugin-baitshop-hooks

[![npm](https://img.shields.io/npm/v/eslint-plugin-baitshop-hooks)](https://npmjs.com/package/eslint-plugin-baitshop-hooks)
[![license](https://img.shields.io/github/license/aarongoin/eslint-plugin-baitshop-hooks)](https://github.com/aarongoin/eslint-plugin-baitshop-hooks/blob/master/LICENSE)
[![issues](https://img.shields.io/github/issues/aarongoin/baitshop)](https://github.com/aarongoin/eslint-plugin-baitshop-hooks/issues)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)

This is an ESLint plugin which extends and replaces React's "react-hooks/rules-of-hooks" eslint rule to support the use of hooks inside the [baitshop](https://github.com/aarongoin/baitshop) Hook's onRender() method. It does not include the "react-hooks/exhaustive-deps" rule so you'll need to configure that rule separately if you want the full [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html) eslint experience.

The code provided here is mostly copied directly from the react eslint plugin with very little modification to support baitshop.

## Installation

Assuming you already have ESLint installed, run:

```sh
# npm
npm install eslint-plugin-baitshop-hooks --save-dev

# yarn
yarn add eslint-plugin-baitshop-hooks --dev
```

Then extend the recommended eslint config:

```js
{
  "extends": [
    // ...
    "plugin:baitshop-hooks/recommended"
  ]
}
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
  "plugins": [
    // ...
    "baitshop-hooks"
  ],
  "rules": {
    // ...
    "baitshop-hooks/rules-of-hooks": "error",
  }
}
```

## Valid and Invalid Examples

Please refer to the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html) documentation and the [Hooks FAQ](https://reactjs.org/docs/hooks-faq.html#what-exactly-do-the-lint-rules-enforce) to learn more about this rule.

## License

BSD-3-Clause

---
_Source: https://npm.io/package/eslint-plugin-baitshop-hooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
