Skip to content

Commit 7bc063d

Browse files
committed
update readme regarding compatibility of rules
1 parent f16185c commit 7bc063d

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Add an `.eslintrc.json` file to your `cypress` directory with the following:
2121
"plugins": [
2222
"cypress"
2323
],
24-
"extends": [
25-
"plugin:cypress/recommended"
26-
],
2724
"env": {
2825
"cypress/globals": true
2926
}
@@ -32,16 +29,22 @@ Add an `.eslintrc.json` file to your `cypress` directory with the following:
3229

3330
## Rules
3431

35-
Rules are grouped by category to help you understand their purpose.
32+
These rules enforce some of the [best practices recommended for using Cypress](https://on.cypress.io/best-practices). Use them by adding the following to your eslint config:
3633

37-
Rules with a check mark (✅) are enabled by default while using
38-
the `plugin:cypress/recommended` config.
34+
```json
35+
// my-project/cypress/.eslintrc.json
3936

40-
The --fix option on the command line automatically fixes problems reported by
41-
rules which have a wrench (🔧) below.
37+
{
38+
// ... other config ...
39+
"extends": [
40+
"plugin:cypress/recommended"
41+
]
42+
}
43+
```
4244

45+
Rules with a check mark (✅) are enabled by default while using the `plugin:cypress/recommended` config.
4346

44-
### Possible Errors
47+
**NOTE**: These rules currently require eslint 5.0 or greater. If you would like support added for eslint 4.x, please 👍 [this issue](https://github.com/cypress-io/eslint-plugin-cypress/issues/14).
4548

4649
| | Rule ID | Description |
4750
|:---|:--------|:------------|
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## No Assigning Return Values
22

3-
See [the Cypress Best Practices guide](https://docs.cypress.io/guides/references/best-practices.html#Assigning-Return-Values).
3+
See [the Cypress Best Practices guide](https://on.cypress.io/best-practices#Assigning-Return-Values).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## No Assigning Return Values
22

3-
See [the Cypress Best Practices guide](https://docs.cypress.io/guides/references/best-practices.html#Unnecessary-Waiting).
3+
See [the Cypress Best Practices guide](https://on.cypress.io/best-practices#Unnecessary-Waiting).

lib/rules/no-assigning-return-values.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
description: 'Prevent assigning return values of cy calls',
2323
category: 'Possible Errors',
2424
recommended: true,
25-
url: 'https://docs.cypress.io/guides/references/best-practices.html#Assigning-Return-Values',
25+
url: 'https://on.cypress.io/best-practices#Assigning-Return-Values',
2626
},
2727
schema: [],
2828
messages: {

lib/rules/no-unnecessary-waiting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
description: 'Prevent waiting for arbitrary time periods',
1212
category: 'Possible Errors',
1313
recommended: true,
14-
url: 'https://docs.cypress.io/guides/references/best-practices.html#Unnecessary-Waiting',
14+
url: 'https://on.cypress.io/best-practices#Unnecessary-Waiting',
1515
},
1616
schema: [],
1717
messages: {

0 commit comments

Comments
 (0)