Set of tslint rules for testing with cypress.io.
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.
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.
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.
Prevents passing return values of Cypress commands (type Chainable
) to function arguments.