eslint-plugin-vest
Eslint plugin for vest validations.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-vest
:
$ npm install eslint-plugin-vest --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-vest
globally.
Usage
Add vest
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
Then configure the rules you want to use under the rules section.
Supported rules
exclude-before-test
This rule prevents you from calling the vest.only()
and vest.skip()
hooks after your test runs, improving performance and preventing unexpected behavior in async tests.
- Bad code example 🚨
;
- Good code example ✅
;
hook-scope
Makes sure you only call vest hooks from the scope they are allowed to run from.
- Bad code examples 🚨
;
- Good code examples ✅
;