@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: [
'@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.