@lmc-eu/eslint-config-jest

3.0.2 • Public • Published

@lmc-eu/eslint-config-jest

LMC’s ESLint config for projects using Jest as test runner

These configuration files are suitable to lint Jest test files.

Install

npm install @lmc-eu/eslint-config-jest -D

or

yarn add @lmc-eu/eslint-config-jest -D

Usage

Create a .eslintrc.js file with the following contents:

module.exports = {
  extends: [
    // ... (base eslint config)
    '@lmc-eu/eslint-config-jest',
  ],
};

The shareable config can be customized in your eslint configuration file.

Use this ruleset to configure ESLint to lint your Jest test files. Jest test files are by default identified by *.test.* or *.spec.* filenames or by being in the test/ directory in your project root or by using __test__/ directories near your tested files.

⚠️ You can use this environment ruleset in combination with any of the existing environment rulesets. Just make sure this one comes in as the last one.

Plugins

This configuration uses the following plugins:

Rules

For available rules see ESLint plugin Jest and ESLint plugin Jest Formatting

License

See the LICENSE file for information.

Readme

Keywords

Package Sidebar

Install

npm i @lmc-eu/eslint-config-jest

Weekly Downloads

331

Version

3.0.2

License

MIT

Unpacked Size

8.21 kB

Total Files

5

Last publish

Collaborators

  • dlouhak
  • crishpeen
  • petrofcikmatus
  • martinhrdlicka
  • petrlz
  • ondram
  • literat