Mensae / jm-eslint-config-jest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@jm/eslint-config-jest

An ESLint config that enforces best practices and prevents possible problems with Jest.

It is meant as an extention to @jm/eslint-config-base, but can be used without. By default it does not include any rules with regard to styling and formatting.

The idea is to use prettier for styling and so it does not include rules that are conflicting with prettier.

Available configs

  • jest, The, default, base configuration that does not include any rules with regard to styling
  • formatting, Extention to the jest config that does include styling rules but only those that are not covered by prettier.

Installation

# inside your project's working tree
npm install @jm/eslint-config-jest --save-dev

Usage

Example .eslintrc.json with only the base config

{
  "extends": ["@jm/jest"]
}

Example .eslintrc.json with base config extended with formatting rules

{
  "extends": ["@jm/jest", "@jm/eslint-config-jest/formatting"]
}

Recommended usage

{
  "extends": ["@jm/base", "@jm/jest"]
}

Or with formatting:

{
  "extends": [
    "@jm/base",
    "@jm/eslint-config-base/formatting",
    "@jm/jest",
    "@jm/eslint-config-jest/formatting"
  ]
}

About

License:MIT License


Languages

Language:JavaScript 100.0%