-
Notifications
You must be signed in to change notification settings - Fork 89
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
Don't allow assigning return values to objects #20
Comments
For whoever might work on implementing this change, there are plenty of other contexts where a return value gets used, e.g., within a template, as part of a binary expression, etc. etc. In our work on module.exports = ({parent}) => !parent || parent.type === 'ExpressionStatement'; Then just call this method with the You may need to expand though to check the ancestor chain to allow for chained commands like |
By the way, this proposed expanding to other contexts could help catch another problem, namely that Cypress doesn't seem to like |
Or if cypress-io/cypress#6575 is implemented, to liberalize returning a (Promise) value from a known custom command. |
…lobals-13.16.0 chore(deps): bump globals from 13.15.0 to 13.16.0
|
I have a team that's started writing Cypress like:
I was expecting
no-assigning-return-values
to error out on the assignment of a cypress command toscope.baddie
.const scope = {}
is also discouraged by Cypress's Docs, but that's another issue.The text was updated successfully, but these errors were encountered: