-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several advanced examples fail cypress/unsafe-to-chain-command lint rule #661
Comments
Hi @MikeMcC399 👋, thanks for logging this issue. I took a cursory look at the reported errors and the rule appears to be correct so we should do |
Hi @mschile Thank you very much for qualifying this issue! I can't provide a solution for this issue, so I would be happy for the core team to make the changes in the examples. |
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Matt Schile <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Unfortunately I'm unable to provide a PR to resolve this issue, which remains unaddressed. Steps to reproduceComment out cypress-example-kitchensink/.eslintrc Line 18 in b49f532
and then execute npm run lint shows
|
+1 |
@MikeMcC399 I'd be fine with an update to the example recipes to reflect our new conventions. We just never revisited this. |
This issue is still open because as I said previously I don't have the skills for this and nobody else has picked it up. |
|
🎉 This issue has been resolved in version 2.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
If the eslint rule
cypress/unsafe-to-chain-command
from eslint-plugin-cypress: Rules is enabled, then the following 6 examples in cypress/e2e/2-advanced-examples fail linting with the message:"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""✖ 57 problems (51 errors, 0 warnings)"
Here is a portion of actions.cy.js which fails linting:
Expectation
Since the rule
cypress/unsafe-to-chain-command
is part ofplugin:cypress/recommended
rules according to eslint-plugin-cypress: Rules I would expect standard examples to pass this lint test.Steps to reproduce
Add
"cypress/unsafe-to-chain-command": "error"
torules
of .eslintrc, similar to the followingExecute:
Reproducible example on https://github.com/MikeMcC399/cypress-example-kitchensink/tree/test/unsafe-to-chain
Environment
latest
)Next steps
The text was updated successfully, but these errors were encountered: