# eslint-plugin-jest-formatting

> ESLint rules for formatting jest tests

Latest version **3.1.0** (published 2021-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-jest-formatting
pnpm add eslint-plugin-jest-formatting
yarn add eslint-plugin-jest-formatting
bun add eslint-plugin-jest-formatting
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2021-11-17 |
| First published | 2019-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^12.22.0 \|\| ^14.17.0 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 73.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 159 |
| Author | Dan Green-Leipciger |
| Maintainers | dangreenleipciger |
| Keywords | eslint, eslintplugin, eslint-plugin, jest, format, formatting, padding |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-jest-formatting
- Repository: https://github.com/dangreenisrael/eslint-plugin-jest-formatting
- Homepage: https://github.com/dangreenisrael/eslint-plugin-jest-formatting#readme
- Issues: https://github.com/dangreenisrael/eslint-plugin-jest-formatting/issues
- npm.io page: https://npm.io/package/eslint-plugin-jest-formatting

## 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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2021-11-17
- 3.0.0 — 2021-05-05
- 2.0.1 — 2021-01-16
- 2.0.0 — 2020-06-24
- 1.2.0 — 2019-10-31
- 1.1.1 — 2019-10-24
- 1.1.0 — 2019-08-14
- 1.0.0 — 2019-08-12
- 0.1.0 — 2019-07-20
- 0.0.11 — 2019-06-24
- 0.0.10 — 2019-06-21
- 0.0.9 — 2019-05-04
- 0.0.8 — 2019-04-07
- 0.0.7 — 2019-04-07
- 0.0.6 — 2019-04-05
- … 3 more at https://npm.io/package/eslint-plugin-jest-formatting/versions

## README

[![CircleCI](https://circleci.com/gh/dangreenisrael/eslint-plugin-jest-formatting/tree/master.svg?style=svg)](https://circleci.com/gh/dangreenisrael/eslint-plugin-jest-formatting/tree/master)
![npm monthly downloads](https://img.shields.io/npm/dm/eslint-plugin-jest-formatting.svg)

# eslint-plugin-jest-formatting

This package provides ESLint rules for jest test suites.

This project aims to provide formatting rules (auto-fixable where possible) to ensure consistency and readability in jest test suites.

Like this plugin? [Say thanks with a ⭐️](https://github.com/dangreenisrael/eslint-plugin-jest-formatting/stargazers)

**_Note: The master version may not be the version deployed to npm. Please treat https://www.npmjs.com/package/eslint-plugin-jest-formatting as the cannonical source for docs._**

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ yarn add eslint --dev
```

Next, install `eslint-plugin-jest-formatting`:

```
$ yarn add eslint-plugin-jest-formatting --dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-jest-formatting` globally.

## Usage

Add `jest-formatting` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["jest-formatting"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "jest-formatting/padding-around-describe-blocks": 2,
    "jest-formatting/padding-around-test-blocks": 2
  }
}
```

_or_

You can use our "recommended" settings which enables most of the rules for you

```json
{
  "extends": ["plugin:jest-formatting/recommended"]
}
```

We also support a "strict" settings which enabled all of the rules for you

```json
{
  "extends": ["plugin:jest-formatting/strict"]
}
```

## Rule Documentation

- [padding-around-after-all-blocks](docs/rules/padding-around-after-all-blocks.md)
- [padding-around-after-each-blocks](docs/rules/padding-around-after-each-blocks.md)
- [padding-around-before-all-blocks](docs/rules/padding-around-before-all-blocks.md)
- [padding-around-before-each-blocks](docs/rules/padding-around-before-each-blocks.md)
- [padding-around-expect-groups](docs/rules/padding-around-expect-groups.md)
- [padding-around-describe-blocks](docs/rules/padding-around-describe-blocks.md)
- [padding-around-test-blocks](docs/rules/padding-around-test-blocks.md)
- [padding-around-all](docs/rules/padding-around-all.md)

## Related Projects

### eslint-plugin-jest

This provides an extensive set of jest eslint rules

https://github.com/jest-community/eslint-plugin-jest

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