|
1 | | -// Linkinator treats the following as regex. |
| 1 | +/** |
| 2 | + * This file exports a mix of strings and of regexes. Linkinator relies |
| 3 | + * on this in `script/check-english-links.js` when we encounter external |
| 4 | + * links that we *specifically ignore*. That means, that URLs or patterns |
| 5 | + * mentioned in this file might appear within our content but we don't |
| 6 | + * bother checking that they actually work. |
| 7 | + */ |
| 8 | + |
| 9 | +/* eslint-disable prefer-regex-literals */ |
| 10 | + |
2 | 11 | export default [ |
3 | 12 | // Skip GitHub search links. |
4 | | - 'https://github.com/search\\?', |
5 | | - 'https://github.com/github/gitignore/search\\?', |
| 13 | + // E.g. https://github.com/search?foo=bar |
| 14 | + new RegExp('https://github\\.com/search\\?'), |
| 15 | + new RegExp('https://github\\.com/github/gitignore/search\\?'), |
6 | 16 |
|
7 | 17 | // These links require auth. |
8 | | - 'https://github.com/settings/profile', |
9 | | - 'https://github.com/github/docs/edit', |
10 | | - 'https://github.com/github/insights-releases/releases/latest', |
11 | | - 'https://classroom.github.com/videos', |
| 18 | + new RegExp('https://github\\.com/settings/profile'), |
| 19 | + new RegExp('https://github\\.com/github/docs/edit'), |
| 20 | + new RegExp('https://github\\.com/github/insights-releases/releases/latest'), |
| 21 | + new RegExp('https://classroom\\.github.com/videos'), |
12 | 22 |
|
13 | 23 | // Oneoff links that link checkers think are broken but are not. |
14 | 24 | 'https://haveibeenpwned.com/', |
15 | | - 'https://www.ilo.org/dyn/normlex/en/f\\?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029', |
| 25 | + 'https://www.ilo.org/dyn/normlex/en/f?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029', |
16 | 26 | 'https://www.linkedin.com/company/github', |
17 | 27 | 'https://www.facebook.com/', |
18 | 28 | 'https://ko-fi.com/', |
|
0 commit comments