-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy path.remarkrc.mjs
More file actions
79 lines (69 loc) · 2.67 KB
/
.remarkrc.mjs
File metadata and controls
79 lines (69 loc) · 2.67 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
79
// @ts-check
import remarkFrontmatter from "remark-frontmatter";
import remarkGfm from "remark-gfm";
import remarkMdx from "remark-mdx";
import remarkDirective from "remark-directive";
import remarkComment from "@slorber/remark-comment";
import remarkPresetLintRecommended from "remark-preset-lint-recommended";
import remarkLintListItemIndent from "remark-lint-list-item-indent";
import remarkLintOrderedListMarkerStyle from "remark-lint-ordered-list-marker-style";
import remarkLintNoUndefinedReferences from "remark-lint-no-undefined-references";
import remarkLintNoDuplicateDefinitions from "remark-lint-no-duplicate-definitions";
import remarkLintNoUnusedDefinitions from "remark-lint-no-unused-definitions";
import remarkLintDefinitionCase from "remark-lint-definition-case";
import remarkLintFencedCodeMarker from "remark-lint-fenced-code-marker";
import remarkLintCodeBlockStyle from "remark-lint-code-block-style";
import remarkLintHeadingStyle from "remark-lint-heading-style";
import remarkLintLinkTitleStyle from "remark-lint-link-title-style";
import remarkLintMaximumLineLength from "remark-lint-maximum-line-length";
import remarkLintNoFileNameOuterDashes from "remark-lint-no-file-name-outer-dashes";
import remarkLintNoHeadingPunctuation from "remark-lint-no-heading-punctuation";
import remarkLintNoMultipleToplevelHeadings from "remark-lint-no-multiple-toplevel-headings";
import remarkLintNoShellDollars from "remark-lint-no-shell-dollars";
const plugins = [
// MDX support
remarkMdx,
remarkDirective,
remarkFrontmatter,
remarkGfm,
remarkComment,
// Base recommended rules
remarkPresetLintRecommended,
// List formatting
[remarkLintListItemIndent, "one"],
[remarkLintOrderedListMarkerStyle, "."],
// Code formatting
[remarkLintFencedCodeMarker, "`"],
[remarkLintCodeBlockStyle, "fenced"],
[remarkLintNoShellDollars, false],
// Heading formatting
[remarkLintHeadingStyle, "atx"],
[remarkLintNoHeadingPunctuation, false],
remarkLintNoMultipleToplevelHeadings,
// Link and reference formatting
[remarkLintLinkTitleStyle, '"'],
[remarkLintNoUndefinedReferences, false],
remarkLintNoDuplicateDefinitions,
remarkLintNoUnusedDefinitions,
[remarkLintDefinitionCase, false],
// General formatting
[remarkLintMaximumLineLength, false],
remarkLintNoFileNameOuterDashes,
// Disable rules that conflict with MDX/JSX
["remark-lint-no-html", false],
["remark-lint-no-inline-padding", false],
];
export const remarkConfig = {
plugins,
settings: {
bullet: "-",
emphasis: "*",
fences: true,
listItemIndent: "one",
quote: '"',
rule: "-",
tightDefinitions: true,
hardBreakEscape: false,
},
};
export default remarkConfig;