cypress/no-async-before rule fails with "definition not found"
MikeMcC399 opened this issue · 1 comments
MikeMcC399 commented
Issue
- The rule no-async-before provided by PR #151 is not found when attempting to use it:
1:1 error Definition for rule 'cypress/no-async-before' was not found cypress/no-async-before
Additionally there are documentation errors and omissions:
- The entry for this rule is missing in the README > Rules section, although it is mentioned in the README > Usage section.
- The documentation heading for no-async-before "Prevent using async/await in Cypress test cases (no-async-tests)" is incorrect and is the same as no-async-tests.
Steps to reproduce
Ubuntu 22.04.4
LTS, Node.js v22.12.2
LTS
Execute
mkdir no-async-before-test
cd no-async-before-test
git init
npm init -y
npm install eslint@8 eslint-plugin-cypress@latest
Create a .eslintrc.json
file
{
"plugins": [
"cypress"
],
"rules": {
"cypress/no-async-tests": "error",
"cypress/no-async-before": "error"
}
}
touch index.js
npx eslint .
Logs
$ npx eslint .
1:1 error Definition for rule 'cypress/no-async-before' was not found cypress/no-async-before
✖ 1 problem (1 error, 0 warnings)
MikeMcC399 commented
- PR #191 and eslint-plugin-cypress/3.0.1 resolve the issue cypress/no-async-before rule fails with "definition not found"
- The remaining documentation issues are transferred to the new issue #193