-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
avoid 'promise/catch-or-return' errors with Cypress calls #180
Comments
+1, I got the same trouble, so I manually add specific exceptions to |
That all being said....is the parent variable always called something like |
AFAIK and according to the docs, there's always the top-level global variable named |
The "overrides": [
{
"extends": ["plugin:cypress/recommended"],
"files": ["cypress.config.ts", "cypress/**/*.ts"],
"parserOptions": {
"project": ["cypress/tsconfig.json"]
},
"rules": {
"promise/always-return": "off",
"promise/catch-or-return": "off"
}
}, |
The same problem occurs if |
Description
When using the rule
promise/catch-or-return
you get a error with Cypress because they have athen
method.https://docs.cypress.io/api/commands/then.html#Syntax
Steps to Reproduce
then
method. (see docs)Expected behavior:
Need a way to exclude this since this isn't actually a promise.
Actual behavior:
This line is marked as needing a
catch
added but this isn't a promise.Versions
Additional Information
Not sure why the library thinks this is a promise but it shouldn't.
The text was updated successfully, but these errors were encountered: