eslint-plugin-jest-test-each-formatting
v1.1.3
Published
ESLint rules for formatting jest test.each
Downloads
90
Maintainers
Readme
eslint-plugin-jest-test-each-formatting
*(. |_)(test|spec). ESLint plugin that allows automatic formatting of templates when TaggedTemplate format of test.each in (js|jsx|ts|tsx) files.
Support Jest *.each
- describe.each
- describe.only.each
- describe.skip.each
- test.concurrent.each
- test.concurrent.failing.each
- test.concurrent.only.each
- test.concurrent.skip.each
- test.each
- test.failing.each
- test.only.each
- test.skip.each
Installation
- npm install -D eslint
- npm install -D eslint-plugin-jest-test-each-formatting
npm install -D eslint
npm install -D eslint-plugin-jest-test-each-formatting
Usage
Add jest-test-each-formatting
to the plugins section of your .eslintrc
configuration file.
{
"plugins": ["jest-test-each-formatting"]
}
Next, configure the rules in the rules section.
{
"rules": {
"jest-test-each-formatting/format": ["error", {
"indent" : 4
}]
}
}
or
You can use recommended
to activate the rule.
{
"extends": ["plugin:jest-test-each-formatting/recommended"]
}
It also supports a strict
setting to enable strict rules.
{
"extends": ["plugin:jest-test-each-formatting/strict"]
}