LinkChecker and better linksToSkip function (#23001)
* LinkChecker and better linksToSkip function Part of #1253 * try now * escaped * make sure it skips all non-english links * feedbacked
This commit is contained in:
@@ -1,18 +1,28 @@
|
||||
// Linkinator treats the following as regex.
|
||||
/**
|
||||
* This file exports a mix of strings and of regexes. Linkinator relies
|
||||
* on this in `script/check-english-links.js` when we encounter external
|
||||
* links that we *specifically ignore*. That means, that URLs or patterns
|
||||
* mentioned in this file might appear within our content but we don't
|
||||
* bother checking that they actually work.
|
||||
*/
|
||||
|
||||
/* eslint-disable prefer-regex-literals */
|
||||
|
||||
export default [
|
||||
// Skip GitHub search links.
|
||||
'https://github.com/search\\?',
|
||||
'https://github.com/github/gitignore/search\\?',
|
||||
// E.g. https://github.com/search?foo=bar
|
||||
new RegExp('https://github\\.com/search\\?'),
|
||||
new RegExp('https://github\\.com/github/gitignore/search\\?'),
|
||||
|
||||
// These links require auth.
|
||||
'https://github.com/settings/profile',
|
||||
'https://github.com/github/docs/edit',
|
||||
'https://github.com/github/insights-releases/releases/latest',
|
||||
'https://classroom.github.com/videos',
|
||||
new RegExp('https://github\\.com/settings/profile'),
|
||||
new RegExp('https://github\\.com/github/docs/edit'),
|
||||
new RegExp('https://github\\.com/github/insights-releases/releases/latest'),
|
||||
new RegExp('https://classroom\\.github.com/videos'),
|
||||
|
||||
// Oneoff links that link checkers think are broken but are not.
|
||||
'https://haveibeenpwned.com/',
|
||||
'https://www.ilo.org/dyn/normlex/en/f\\?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029',
|
||||
'https://www.ilo.org/dyn/normlex/en/f?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029',
|
||||
'https://www.linkedin.com/company/github',
|
||||
'https://www.facebook.com/',
|
||||
'https://ko-fi.com/',
|
||||
|
||||
Reference in New Issue
Block a user