Skip to content

Commit bf89e1b

Browse files
fix: add missing doc urls (#108)
1 parent 053cb34 commit bf89e1b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

lib/rules/consistent-data-testid.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
const { getDocsUrl } = require('../utils');
4+
35
const FILENAME_PLACEHOLDER = '{fileName}';
46

57
module.exports = {
@@ -8,6 +10,7 @@ module.exports = {
810
description: 'Ensures consistent usage of `data-testid`',
911
category: 'Best Practices',
1012
recommended: false,
13+
url: getDocsUrl('consistent-data-testid'),
1114
},
1215
messages: {
1316
invalidTestId: '`{{attr}}` "{{value}}" should match `{{regex}}`',

lib/rules/no-manual-cleanup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
const { getDocsUrl } = require('../utils');
4+
35
const CLEANUP_LIBRARY_REGEX = /(@testing-library\/(preact|react|svelte|vue))|@marko\/testing-library/;
46

57
module.exports = {
@@ -9,6 +11,7 @@ module.exports = {
911
description: ' Disallow the use of `cleanup`',
1012
category: 'Best Practices',
1113
recommended: false,
14+
url: getDocsUrl('no-manual-cleanup'),
1215
},
1316
messages: {
1417
noManualCleanup:

tests/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { configs, rules } = require('../lib');
44
const fs = require('fs');
55
const path = require('path');
66

7-
const rulesModules = fs.readdirSync(path.join(__dirname, '/lib/rules'));
7+
const rulesModules = fs.readdirSync(path.join(__dirname, '../lib/rules'));
88

99
it('should export all available rules', () => {
1010
const availableRules = rulesModules.map(module => module.replace('.js', ''));

0 commit comments

Comments
 (0)