-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.ts
54 lines (51 loc) · 1.36 KB
/
index.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
import type { Plugin } from 'unified'
const _plugins = await Promise.all(
(
[
'blank-lines-1-0-2',
'blockquote-indentation',
'books-links',
'checkbox-character-style',
'code-block-style',
'definition-case',
'definition-spacing',
'emphasis-marker',
'fenced-code-marker',
'final-newline',
'hard-break-spaces',
'heading-style',
'heading-whitespace',
'link-title-style',
'list-item-bullet-indent',
'list-item-content-indent',
'list-item-indent',
'list-item-spacing',
'maximum-line-length',
'no-blockquote-without-marker',
'no-consecutive-blank-lines',
'no-heading-content-indent',
'no-inline-padding',
'no-long-code',
'no-table-indentation',
'ordered-list-marker-style',
'ordered-list-marker-value',
'rule-style',
'spaces-around-number',
'spaces-around-word',
'strong-marker',
'table-cell-padding',
'table-pipe-alignment',
'table-pipes',
'unordered-list-marker-style',
] as const
).map(async pluginName => {
try {
const { default: plugin } = (await import(
`remark-lint-${pluginName}`
)) as { default: Plugin }
return [plugin, false] as const
} catch {}
}),
)
export const plugins = _plugins.filter(Boolean)
export default { plugins }