# tslint-sinon

> Rules for Sinon mocking library

Latest version **1.1.3** (published 2019-06-06) · MIT license · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2019-06-06 |
| First published | 2019-01-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrey Lipatkin |
| Maintainers | litee |
| Keywords | tslint, sinon |

## Links

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

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2019-06-06
- 1.1.2 — 2019-01-27

## README

# tslint-sinon
This package provides additional TSLint rules that help to enforce some best practices when using Sinon mocking library.

## Supported rules

* `sinon-prefer-resolves` - suggests to use `stub.resolves(x)` instead of `stub.returns(Promise.resolve(x))`.
* `sinon-prefer-sandbox` - suggests to create fakes via `sandbox` instead of creating them directly.

## How to install

* Run `npm install --save-dev tslint-sinon`
* Add to your `tslint.json`:

```json
  "rules": {
    "sinon-prefer-resolves": true,
    "sinon-prefer-sandbox": true
  },
  "rulesDirectory": [
    "tslint-sinon"
  ]
```

## Status

[![Build Status](https://travis-ci.org/Litee/tslint-sinon.png)](https://travis-ci.org/Litee/tslint-sinon)

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