3.1.0 • Published 2 years ago

eslint-plugin-jest-formatting v3.1.0

Weekly downloads
173,386
License
MIT
Repository
github
Last release
2 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-zeyeslint-config-innovorder-v2@everything-registry/sub-chunk-1612eslint-config-wishket@k.sh/eslint-plugin@liveauctioneers/eslint-config-hammer-ui@readme/eslint-config@reactstarter/eslint-config@runespoorstack/eslint-config@sales-journey/eslint-config@ochnerd/eslint-plugin@pandora-box/eslint-config-jest@rimac-technology/eslint-config@rimac-technology/style-guide@relaycorp/eslint-config@rockpack/codestyle@priver/eslint-config@pfct/purple@plesk/eslint-config@slashnephy/eslint-config@so1ve/eslint-config@so1ve/eslint-config-basic@so1ve/eslint-config-js@sikaeducation/eslint-config@smoozzy/eslint-config@skyscanner/eslint-config-skyscanner@sky-uk/eslint-config-sky-jest@lmc-eu/eslint-config-jest@lyvly/eslint-config@nerdrage/eslint-config@localyze-pluto/eslint-config@lottiefiles/eslint-plugin@molao-ui/eslint-config@morev/eslint-config@kael89/eslint-config-jest@jict/eslint-plugin@medly/eslint-config@lukas.skamarakas/eslint-plugin@mblabs/eslint-config@megabytelabs/eslint-config@linters/eslint-config-jest@knime/eslint-configreactjs-zero@scaleleap/utils@resturant-webtool/eslint-config-bases@progressivestudio/eslint-plugin@shelf/eslint-config@side/eslint-config-jest@shopify/eslint-plugin@terminal-nerds/eslint-config@wishket/eslint-config-wishket@wistia/eslint-config@toptal/davinci-syntax@wyattades/eslint-config@spec-validator/qa@spotmonkeystudios/eslint-config@techmmunity/eslint-config@tinkin/eslint-configeslint-config-altnexteslint-config-baseseslint-config-hardcoreeslint-config-heimdalleslint-config-beslogiceslint-config-brandingbrandeslint-config-codecogeslint-config-superology-vueeslint-config-timetreeeslint-config-tinkineslint-config-tunde-dev-reacteslint-config-steeleslint-config-suiyobieslint-config-strict-modeeslint-config-7sne-eslinteslint-config-backendeslint-config-cortexeslint-config-deepcrawleslint-config-monotseslint-config-ibbizeslint-config-intenseeslint-config-maniaeslint-config-lukemoraleseslint-config-skyscannereslint-config-simplymadeappseslint-config-d2-softwareeslint-config-current-thingeslint-config-ndpkgeslint-config-nhuesmann-ts-reacteslint-config-r1ckyrockzeslint-config-ksv741eslint-config-kyleeslint-config-rocketeslint-config-saiichihashimotoeslint-config-eloquenceeslint-config-get-off-my-lawneslint-config-galexeslint-config-noamkadosh
3.1.0

2 years ago

3.0.0

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.2.0

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago