cypress-io / eslint-plugin-cypress

An ESLint plugin for projects that use Cypress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cypress/no-async-before rule fails with "definition not found"

MikeMcC399 opened this issue · comments

Issue

  1:1  error  Definition for rule 'cypress/no-async-before' was not found  cypress/no-async-before

Additionally there are documentation errors and omissions:

  1. The entry for this rule is missing in the README > Rules section, although it is mentioned in the README > Usage section.
  2. 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)
  • 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