You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-faltest
:
$ npm install eslint-plugin-faltest --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-faltest
globally.
Add faltest
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"faltest"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"faltest/rule-name": 2
}
}
- Enforce using
eventually
when querying page objects or the browser (chai-webdriver-eventually) - Prevent accidental check-in of
roles.only
(mocha-roles-only) - Prevent accidental check-in of network throttling (no-browser-throttle)
- Enforce using the Chai methods provided by @faltest/chai (use-chai-methods)