# tslint-mobx

> Lint rules for projects that use MobX.

Latest version **1.0.12** (published 2020-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install tslint-mobx
pnpm add tslint-mobx
yarn add tslint-mobx
bun add tslint-mobx
```

## 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.12 |
| Published | 2020-01-09 |
| First published | 2018-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | eranshabi |

## Links

- npm: https://www.npmjs.com/package/tslint-mobx
- Repository: https://github.com/eranshabi/tslint-mobx
- Homepage: https://github.com/eranshabi/tslint-mobx#readme
- Issues: https://github.com/eranshabi/tslint-mobx/issues
- npm.io page: https://npm.io/package/tslint-mobx

## Dependencies (1)

- [tslint](https://npm.io/package/tslint.md) ^5.9.1

## Recent versions

- 1.0.12 (latest) — 2020-01-09
- 1.0.11 — 2019-12-19
- 1.0.10 — 2018-12-04
- 1.0.9 — 2018-11-19
- 1.0.8 — 2018-07-04
- 1.0.7 — 2018-07-04
- 1.0.6 — 2018-03-16
- 1.0.5 — 2018-03-09
- 1.0.4 — 2018-03-09
- 1.0.3 — 2018-02-02
- 1.0.2 — 2018-02-02
- 1.0.1 — 2018-02-02
- 1.0.0 — 2018-02-02

## README

# tslint-mobx
Lint rules for projects that use MobX.

### Usage
First install:

`npm install --save-dev tslint-mobx`

Then to use the default rules you can add `tslint-mobx` to `extends` in your `tslint.json`:
```js
{
  "extends": ["tslint-mobx"]
}
```
### Rules
- `mobx-react-no-unused-inject`
  - Makes sure you don't have any unused injected store.
  - For example if you have `@inject('someStore')` decorator wrapping your component, but `this.props.someStore` is unused. 
- `mobx-react-no-empty-inject`
  - Makes sure you don't have any empty injects (`@inject()`).
- `mobx-react-no-inject-decorators`
  - Makes sure you don't have any inject decorators (`@inject()`) at all on classes.
- `mobx-react-no-async-action`
  - Makes sure you don't have any action decorators (`@action`) on async methods. 
    
### Adding your own rules
Adding your own rules is straightforward.

Add your rule file to the `src/rules` directory, and your tests to a file with the same name, ending with `.spec`, in the `test` directory.

PRs are welcome.

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