3.1.0 • Published 4 years ago

eslint-plugin-jest-formatting v3.1.0

Weekly downloads
173,386
License
MIT
Repository
github
Last release
4 years ago

CircleCI npm monthly downloads

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 ⭐️

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:

$ 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:

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

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

{
  "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

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

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

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

Rule Documentation

Related Projects

eslint-plugin-jest

This provides an extensive set of jest eslint rules

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

eslint-config-innovorder@infinitebrahmanuniverse/nolb-eslint-plugin-jeslint-config-equips-tseslint-config-tyler-zeyeslint-tyler-zey@everything-registry/sub-chunk-1612eslint-config-wishketvoluptatesporro@doctarigroup/eslint-config@doctarigroup/eslint-config-react@doctarigroup/eslint-config-typescript@doctarigroup/eslint-config-typescript-react@code-quality/eslint-config-jest@cortl/eslint-config@developer-kit/eslint-config@byndyusoft/eslint-config@belgattitude/eslint-config-bases@runespoorstack/eslint-config@aidenlx/eslint-config@api3/eslint-plugin-commons@andrmoel/eslint-config@andrmoel/eslint-config-react@andrmoel/eslint-config-typescript@atir-naveed-geeksltd/eslint-config@atomspace/eslint@alex7kom/sayonara-config@babbel/eslint-config@ahiho/eslint-config@beyondessential/eslint-config-jest@bigcommerce/eslint-config@byte-craft-react/eslint-config@cityelectricalfactors/eslint-config-base@chiubaka/eslint-config@chrisblossom/eslint-config@chimericdream/eslint-config-jest@adbayb/eslint-config@adbayb/stack@adchitects/eslint-config@adhamu/zero@7sne/eslint@col0ring/eslint-config@bothrs/eslint-config-jest@econominhas/eslint-config@hannoeru/eslint-plugin@hannohealth/eslint-config@heed/eslint-config-heed@hybrbase/eslint-config@faustbrian/stdlint@emiolo/design-patterns@emiolo/eslint-config@emiolo/thalamus-express@gathermade/eslint-config@functorfactory/eslint-config@fullstacksjs/eslint-config@flynoe/eslint-config-basic@getracker/eslint-config@liveauctioneers/eslint-config-hammer-ui@lmc-eu/eslint-config-jest@localyze-pluto/eslint-config@lottiefiles/eslint-plugin@isnotdefined/eslint-config@linters/eslint-config-jest@lukas.skamarakas/eslint-plugin@lyvly/eslint-config@nerdrage/eslint-config@mblabs/eslint-config@medly/eslint-config@megabytelabs/eslint-config@molao-ui/eslint-config@kael89/eslint-config-jest@k.sh/eslint-plugin@knime/eslint-config@jict/eslint-plugin@hendacorp/eslint-plugin@hybrbase-front/eslint-config@hybrbase-staxomni/eslint-config@dvukovic/style-guide@morev/eslint-config@priver/eslint-config@sales-journey/eslint-config@progressivestudio/eslint-plugin@scaleleap/utils@readme/eslint-config@reactstarter/eslint-config@plesk/eslint-config@ochnerd/eslint-plugin@pandora-box/eslint-config-jest@skyscanner/eslint-config-skyscanner@shelf/eslint-config@sky-uk/eslint-config-sky-jest@slashnephy/eslint-config@spotmonkeystudios/eslint-config@so1ve/eslint-config@so1ve/eslint-config-basic@so1ve/eslint-config-js@smoozzy/eslint-config@spec-validator/qa@shopify/eslint-plugin@resturant-webtool/eslint-config-bases@rimac-technology/eslint-config
3.1.0

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago