JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 519461
  • Score
    100M100P100Q198162F
  • License MIT

Formatting rules for test written with jest

Package Exports

  • eslint-plugin-jest-formatting

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-jest-formatting) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CircleCI star this repo

eslint-plugin-jest-formatting

Formatting rules for tests written in jest

Like this plugin? Say thanks with a ⭐️

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-before-test-blocks": 2,
        "jest-formatting/padding-before-describe-blocks": 2,
    }
}

Rule Documentation