eslint-plugin-prodperfect-testcafe
ESLint plugin with custom rules for testcafe code linting.
Installation
npm i eslint babel-eslint eslint-plugin-prodperfect-testcafe --save-dev
Configuration
In the root of your test suite repo, include a .eslintrc.json
with the following contents:
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"prodperfect-testcafe"
],
"rules": {
"prodperfect-testcafe/no-debug-statements":"error",
"prodperfect-testcafe/no-only-statements":"error",
"prodperfect-testcafe/p2-test-names":"error"
}
}
Running
Save the following command as an entry in the "scripts"
object within the suite's package.json
:
"lint":"node_modules/.bin/eslint tests/regression-tests.js -c .eslintrc.json"
Execute npm run lint
.