Skip to content

avoid 'promise/catch-or-return' errors with Cypress calls #180

Closed
@GodOfGrandeur

Description

@GodOfGrandeur

Description

When using the rule promise/catch-or-return you get a error with Cypress because they have a then method.

https://docs.cypress.io/api/commands/then.html#Syntax

Steps to Reproduce

  1. Create repo with this module and Cypress installed
  2. Create integration file where you make use of 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

  • Node version: v10.16.2
  • ESLint version: v5.3.0
  • eslint-plugin-promise version: v4.2.1

Additional Information

Not sure why the library thinks this is a promise but it shouldn't.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions