You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone --branch cypress-linting-each https://github.com/MikeMcC399/cypress-test-tiny
cd cypress-test-tiny
npm ci
npm run cypress:lint
Note that the example fails when run with npx cypress run because the test page https://example.cypress.io/commands/connectors doesn't match the test, however this issue is only about linting, not about getting the test to run successfully.
Cypress Version
14.0.0
Node version
v22.13.1
Operating System
Ubuntu 24.04.1 LTS
Debug Logs
$ npm run cypress:lint
> [email protected] cypress:lint
> eslint cypress
/home/mike/github/cypress-io/cypress-test-tiny/cypress/e2e/each.cy.js
10:5 error It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line cypress/unsafe-to-chain-command
✖ 1 problem (1 error, 0 warnings)
Current behavior
The following API example for
.each()
as shown on the documentation site under DOM Elementsfails linting with the error
cypress/unsafe-to-chain-command
.Desired behavior
All examples in API > Other Commands > end > Examples showing the use of the Cypress API call
.each
should pass linting using the Cypress linting recommended configuration as defined by the Cypress-provided cypress-io/eslint-plugin-cypress npm module.Test code to reproduce
git clone --branch cypress-linting-each https://github.com/MikeMcC399/cypress-test-tiny cd cypress-test-tiny npm ci npm run cypress:lint
Note that the example fails when run with
npx cypress run
because the test page https://example.cypress.io/commands/connectors doesn't match the test, however this issue is only about linting, not about getting the test to run successfully.Cypress Version
14.0.0
Node version
v22.13.1
Operating System
Ubuntu
24.04.1
LTSDebug Logs
Other
eslint Version
9.18.0
eslint-plugin-cypress Version
4.1.0
Related
The text was updated successfully, but these errors were encountered: