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.
jest
, The, default, base configuration that does not include any rules with regard to stylingformatting
, Extention to thejest
config that does include styling rules but only those that are not covered by prettier.
# inside your project's working tree
npm install @jm/eslint-config-jest --save-dev
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"]
}
{
"extends": ["@jm/base", "@jm/jest"]
}
Or with formatting:
{
"extends": [
"@jm/base",
"@jm/eslint-config-base/formatting",
"@jm/jest",
"@jm/eslint-config-jest/formatting"
]
}