Skip to content

Commit

Permalink
chore: add more ignored links (#4522)
Browse files Browse the repository at this point in the history
* chore: add more ignored links

* ignore all w3 links
  • Loading branch information
thaddmt authored Oct 10, 2023
1 parent cdf6154 commit 7baa9ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/scripts/util/checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export async function checkLink(
`⚠️[WARNING...] page #${pageIdx} link #${linkIdx} "${tagName}" tag "${tagText}" doesn't have a href.`
);
res({ ...linkData, statusCode: 0 });
} else if (IGNORED_LINKS.includes(href) || requestedUrl.has(href)) {
} else if (
IGNORED_LINKS.includes(href) ||
requestedUrl.has(href) ||
(href as string).includes('www.w3.org')
) {
res({ ...linkData, statusCode: 0 });
} else {
const { get } = href.includes('https:') ? https : http;
Expand Down
8 changes: 8 additions & 0 deletions docs/src/data/ignoredLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ export const IGNORED_LINKS = [
'https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1/model.json?tfjs-format=file', // 302 to a google cdn
'https://cdn.liveness.rekognition.amazonaws.com/face-detection/tensorflow/tfjs-backend-wasm/3.11.0/', // 404 this is the intentional path as the tfjs library will append the correct file name
'https://cdn.liveness.rekognition.amazonaws.com',
'https://www.figma.com/community/file/1047600760128127424',
'https://www.figma.com/community/plugin/1040722185526429545/AWS-Amplify-Theme-Editor',
'https://www.w3.org/WAI/ARIA/apg/patterns/tabs/',
'https://www.w3.org/WAI/standards-guidelines/act/rules/0ssw9k/proposed/',
'https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/#aria_lh_step3',
'https://www.w3.org/WAI/ARIA/apg/patterns/alert/examples/alert/',
'https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/',
'https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/',
];

0 comments on commit 7baa9ed

Please sign in to comment.