Skip to content

fix: add missing doc urls #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/rules/consistent-data-testid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

const { getDocsUrl } = require('../utils');

const FILENAME_PLACEHOLDER = '{fileName}';

module.exports = {
Expand All @@ -8,6 +10,7 @@ module.exports = {
description: 'Ensures consistent usage of `data-testid`',
category: 'Best Practices',
recommended: false,
url: getDocsUrl('consistent-data-testid'),
},
messages: {
invalidTestId: '`{{attr}}` "{{value}}" should match `{{regex}}`',
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-manual-cleanup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

const { getDocsUrl } = require('../utils');

const CLEANUP_LIBRARY_REGEX = /(@testing-library\/(preact|react|svelte|vue))|@marko\/testing-library/;

module.exports = {
Expand All @@ -9,6 +11,7 @@ module.exports = {
description: ' Disallow the use of `cleanup`',
category: 'Best Practices',
recommended: false,
url: getDocsUrl('no-manual-cleanup'),
},
messages: {
noManualCleanup:
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { configs, rules } = require('../lib');
const fs = require('fs');
const path = require('path');

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

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