1.0.0 • Published 4 years ago
@superbet/eslint-config-jest v1.0.0
Superbet's ESLint Configuration for Projects Tested with Jest
Use this configuration to enhance your testing experience with jest.
Installation
npm i -SE @superbet/eslint-config-jestAdding it to Your Config
We recommend not mixing this configuration with other configurations related to project files that are not tests. Some rules may come into conflict with non-test files. To avoid this, there are two valid approaches:
Overriding on a Per-File Basis
.eslintrc
{
"overrides": [
{
"files": [
"**/*.test.js",
"**/*.test.jsx",
"**/*.spec.js",
"**/*.spec.jsx"
],
"extends": "@superbet/eslint-config-jest"
}
]
}Overriding on a Per-Directory Basis
Either add the following to your .eslintrc:
NOTE: replace
__TESTS__/**/*with your test directory.
{
"overrides": [
{
"files": ["__TESTS__/**/*"],
"extends": "@superbet/eslint-config-jest"
}
]
}Or add a new .eslintrc file in your test directory:
{
"extends": "@superbet/eslint-config-jest"
}1.0.0
4 years ago