-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.remarkrc.mjs
44 lines (40 loc) · 1.94 KB
/
.remarkrc.mjs
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
// presets imports
import remarkPresetLintRecommended from 'remark-preset-lint-recommended'
import remarkPresetLintConsistent from 'remark-preset-lint-consistent'
import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'
// rules imports
import remarkLintMaximumHeadingLength from 'remark-lint-maximum-heading-length'
import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style'
import remarkLintNoUndefinedReferences from 'remark-lint-no-undefined-references'
import remarkLintLinkTitleStyle from 'remark-lint-link-title-style'
import remarkLintMaximumLineLength from 'remark-lint-maximum-line-length'
import remarkLintListItemSpacing from 'remark-lint-list-item-spacing'
// remark plugins
import remarkGfm from 'remark-gfm'
import remarkFrontmatter from 'remark-frontmatter'
const config = {
plugins: [
// first the plugins
remarkGfm,
remarkFrontmatter,
// then the presets
remarkPresetLintRecommended,
remarkPresetLintConsistent,
remarkPresetLintMarkdownStyleGuide,
// and finally the rules customizations
// https://www.npmjs.com/package/remark-lint-maximum-heading-length
[remarkLintMaximumHeadingLength, [1, 100]],
// https://www.npmjs.com/package/remark-lint-unordered-list-marker-style
[remarkLintUnorderedListMarkerStyle, 'consistent'],
// https://www.npmjs.com/package/remark-lint-no-undefined-references
[remarkLintNoUndefinedReferences, { allow: ['!NOTE', '!TIP', '!MORE', '!WARN', ' ', 'x'] }],
// https://www.npmjs.com/package/remark-lint-link-title-style
[remarkLintLinkTitleStyle, '\''],
// https://www.npmjs.com/package/remark-lint-maximum-line-length
[remarkLintMaximumLineLength, false],
// https://www.npmjs.com/package/remark-lint-list-item-spacing
[remarkLintListItemSpacing, false],
remarkFrontmatter
]
}
export default config