forked from w3c/aria-practices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.link-checker.js
29 lines (29 loc) · 875 Bytes
/
.link-checker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = {
filesToIgnore: [
// For example:
// 'content/shared/templates/example-usage-warning.html',
],
excludedLinks: {
'content/patterns/menubar/examples/menubar-navigation.html': [
'#ex1 [role=menuitem]',
],
'content/patterns/treeview/examples/treeview-navigation.html': [
'#ex1 [role=treeitem]',
],
'content/patterns/carousel/examples/carousel-2-tablist.html': [
'.carousel-image a',
],
},
hashCheckHandlers: [
{
name: 'github',
pattern: /^https:\/\/github\.com\/.*/,
matchHash: (ids, hash) =>
ids.includes(hash) || ids.includes(`user-content-${hash}`),
},
],
ignoreHashesOnExternalPagesMatchingRegex: [
// Some hash links are resolved with JS and are therefore difficult to check algorithmically
/^https:\/\/html\.spec\.whatwg\.org\/multipage\//,
],
};