Skip to content

Commit 131d3a7

Browse files
Merge pull request #188 from MikeMcC399/update/meta-url
chore: standardize meta.url property
2 parents 5c1b59a + 8071dd8 commit 131d3a7

10 files changed

+16
-5
lines changed

.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
"plugin:mocha/recommended"
1616
],
1717
"rules": {
18+
"eslint-plugin/require-meta-docs-url": [
19+
"error",
20+
{
21+
"pattern": "https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/{{name}}.md"
22+
}
23+
],
1824
"n/no-extraneous-require": [
1925
"error",
2026
{

lib/rules/assertion-before-screenshot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
description: 'Assert on the page state before taking a screenshot, so the screenshot is consistent',
2222
category: 'Possible Errors',
2323
recommended: false,
24+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/assertion-before-screenshot.md',
2425
},
2526
schema: [],
2627
messages: {

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://on.cypress.io/best-practices#Assigning-Return-Values',
25+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-assigning-return-values.md',
2626
},
2727
schema: [],
2828
messages: {

lib/rules/no-async-before.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
description: 'Prevent using async/await in Cypress before methods',
88
category: 'Possible Errors',
99
recommended: true,
10+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-before.md',
1011
},
1112
schema: [],
1213
messages: {

lib/rules/no-async-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
description: 'Prevent using async/await in Cypress test cases',
88
category: 'Possible Errors',
99
recommended: true,
10+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-tests.md',
1011
},
1112
schema: [],
1213
messages: {

lib/rules/no-force.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
description: 'Disallow using of \'force: true\' option for click and type calls',
1212
category: 'Possible Errors',
1313
recommended: false,
14+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-force.md',
1415
},
1516
fixable: null, // or "code" or "whitespace"
1617
schema: [],

lib/rules/no-pause.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
description: 'Disallow using of \'cy.pause\' calls',
1212
category: 'Possible Errors',
1313
recommended: false,
14+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-pause.md',
1415
},
1516
fixable: null, // or "code" or "whitespace"
1617
schema: [],

lib/rules/no-unnecessary-waiting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
description: 'Prevent waiting for arbitrary time periods',
88
category: 'Possible Errors',
99
recommended: true,
10-
url: 'https://on.cypress.io/best-practices#Unnecessary-Waiting',
10+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-unnecessary-waiting.md',
1111
},
1212
schema: [],
1313
messages: {

lib/rules/require-data-selectors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ module.exports = {
44
meta: {
55
type: 'suggestion',
66
docs: {
7-
description: 'Use data-* attributes to provide context to your selectors and insulate them from CSS or JS changes https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements',
7+
description: 'Use data-* attributes to provide context to your selectors and insulate them from CSS or JS changes',
88
category: 'Possible Errors',
99
recommended: false,
10-
url: 'https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements',
10+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/require-data-selectors.md',
1111
},
1212
schema: [],
1313
messages: {

lib/rules/unsafe-to-chain-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module.exports = {
7474
description: DESCRIPTION,
7575
category: 'Possible Errors',
7676
recommended: true,
77-
url: 'https://docs.cypress.io/guides/core-concepts/retry-ability#Actions-should-be-at-the-end-of-chains-not-the-middle',
77+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/unsafe-to-chain-command.md',
7878
},
7979
schema: [schema],
8080
messages: {

0 commit comments

Comments
 (0)