1.0.4 • Published 5 years ago

tslint-plugin-cypress v1.0.4

Weekly downloads
1,963
License
ISC
Repository
github
Last release
5 years ago

tslint-plugin-cypress

Build Status

Set of tslint rules for testing with cypress.io.

Motivation

Main purpose of this package is to prevent working with return values of Cypress commands.

From cypress.io:

You cannot assign or work with the return values of any Cypress command. Commands are enqueued and run asynchronously.

How to use?

Typescript and tslint has to be installed and setup.

npm i -D tslint-plugin-cypress

Then add these to your tslint.json file.

{
  "extends": "tslint-plugin-cypress"
}

Run

./node_modules/.bin/tslint -c tslint.json -p . cypress/**/*.ts -t stylish

If you have troubles with setup, Look at example repo here.

Note: Unfortunately, VS code doesn't support plugins which requires type information.

Rules

no-chainable-assignment

Prevents assignment return values of Cypress commands (type Chainable) to variables. Includes variable declaration, assignment to existing variable, object property assignment and array literal expressions.

no-chainable-arguments

Prevents passing return values of Cypress commands (type Chainable) to function arguments.

2.0.0-beta.1

5 years ago

2.0.1-beta.1

5 years ago

2.0.0-beta.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago