-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.d.ts
55 lines (52 loc) · 1.57 KB
/
index.d.ts
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
import type {Options as RawDeadOrAliveOptions} from 'dead-or-alive'
export {default} from './lib/index.js'
/**
* Configuration.
*/
export interface Options {
/**
* Options passed to `dead-or-alive`
* (optional);
* `deadOrAliveOptions.findUrls` is always off as further URLs are not
* applicable.
*/
deadOrAliveOptions?: Readonly<DeadOrAliveOptions> | null | undefined
/**
* Check relative values relative to this URL
* (optional, example: `'https://example.com/from'`);
* you can also define this by setting `origin` and `pathname` in
* `file.data.meta`.
*/
from?: string | null | undefined
/**
* Whether to ignore `localhost` links such as `http://localhost/*`,
* `http://127.0.0.1/*`
* (default: `false`);
* shortcut for a skip pattern of
* `/^(https?:\/\/)(localhost|127\.0\.0\.1)(:\d+)?/`.
*/
skipLocalhost?: boolean | null | undefined
/**
* Whether to let offline runs pass quietly
* (default: `false`).
*/
skipOffline?: boolean | null | undefined
/**
* List of patterns for URLs that should be skipped
* (optional);
* each URL will be tested against each pattern and will be ignored if
* `new RegExp(pattern).test(url) === true`.
*/
skipUrlPatterns?: ReadonlyArray<RegExp | string> | null | undefined
}
/**
* Configuration for `dead-or-alive` as supported by
* `remark-lint-no-dead-urls`.
*/
interface DeadOrAliveOptions extends RawDeadOrAliveOptions {
/**
* Find URLs in the final resource;
* not supported in `remark-lint-no-dead-urls` as it’s not applicable.
*/
findUrls?: never
}