-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlychee.toml
More file actions
78 lines (71 loc) · 2.99 KB
/
Copy pathlychee.toml
File metadata and controls
78 lines (71 loc) · 2.99 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Lychee link checker configuration
# https://lychee.cli.rs/#/usage/config
#
# Run locally with:
# lychee './**/*.md' './src/**/*.ts' './package.json'
# Check URL fragments in links. Lychee 0.24.0 replaced the boolean form with an
# enum (none/anchor-only/text-only/full); "full" checks both anchor fragments
# (e.g. `#section`) and text fragments (e.g. `#:~:text=example`).
include_fragments = "full"
# Don't allow any redirects, so links that have moved are surfaced and updated
# to their canonical destination.
max_redirects = 0
# Accept these HTTP status codes
# 100-103: Informational responses
# 200-299: Success responses
# 403: Forbidden (some sites use this for rate limiting)
# 429: Too Many Requests
# 500-599: Server errors (temporary issues shouldn't fail CI)
# 999: LinkedIn's custom status code
accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"]
# Exclude URL patterns from checking (treated as regular expressions)
exclude = [
'^file://',
# Live / auth-gated endpoints that appear as string literals or require login
'^https://geoip\.maxmind\.com',
'^https://geolite\.info',
'^https://minfraud\.maxmind\.com',
'^https://sandbox\.maxmind\.com',
'^https://updates\.maxmind\.com',
'^https://www\.maxmind\.com/en/accounts/',
'https://www\.maxmind\.com/en/account/login',
# package.json repository.url uses the canonical npm git clone URL
# (https://github.com/maxmind/minfraud-api-node.git); the ".git" form 301s to
# the web UI but is the correct packaging metadata, so it is not a "link" to
# fix.
'^https://github\.com/maxmind/minfraud-api-node\.git$',
# dev.maxmind.com API docs are client-side rendered, so schema anchors
# (#schema--...) are generated in the browser and are not present in the
# static HTML lychee fetches. The page itself resolves 200; only the
# fragment cannot be verified, so exclude these schema-fragment URLs.
'^https://dev\.maxmind\.com/minfraud/api-documentation/responses/#schema--',
# Placeholders / example URLs used in tests and docstrings
'^https?://example\.(com|org|net)',
'^https?://(www\.)?foobar\.com',
# `http://foo` is a single-label host used to test referrer-URI validation
'^https?://foo/?$',
# Reserved example IPs used to test IP-literal referrer validation
# (RFC 5737 TEST-NET-1 and RFC 3849 IPv6 documentation literals)
'^https?://192\.0\.2\.',
'^https?://\[',
'^http://google\.com',
'^http://localhost',
'127\.0\.0\.1',
]
# Exclude file paths from getting checked (treated as regular expressions)
exclude_path = [
'(^|/)node_modules/',
'(^|/)dist/',
'(^|/)build/',
'(^|/)coverage/',
# docs/ contains generated TypeDoc HTML (gitignored)
'(^|/)docs/',
'(^|/)\.git/',
# Changelog: historical entries are preserved as-is, not rewritten
'(^|/)CHANGELOG\.md$',
]
# Cache results for 1 day to speed up repeated checks
cache = true
max_cache_age = "1d"
# Skip missing input files instead of erroring
skip_missing = true