-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.remarkrc.js
75 lines (70 loc) · 2.08 KB
/
.remarkrc.js
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
const fs = require("fs");
const path = require("path");
const url = require("url");
const unified = require("unified");
const headings = require("rehype-autolink-headings");
const dictionary = fs.readFileSync(url.pathToFileURL(path.join("./dictionary.txt")));
const plugins = [
["remark-frontmatter", "yaml"],
"remark-github",
"remark-toc",
"remark-gfm",
"remark-preset-wooorm",
"lint-fenced-code-flag",
"lint-no-shell-dollars",
["remark-lint-no-html", false],
"remark-preset-davidtheclark",
"remark-comment-config",
"remark-validate-links",
"remark-preset-lint-recommended",
"remark-preset-lint-markdown-style-guide",
["lint-rule-style", false],
["remark-lint-maximum-line-length", false],
["remark-lint-maximum-heading-length", false],
["remark-lint-list-item-indent", false],
["lint-no-multiple-toplevel-headings", false],
["remark-lint-no-emphasis-as-heading", false],
["remark-lint-no-duplicate-headings", true],
[
"remark-retext",
unified()
.use(require("retext-english"))
.use(require("retext-syntax-urls"))
.use(require("retext-syntax-mentions"))
.use(require("retext-emoji"))
.use(require("retext-spell"), {
dictionary: require("dictionary-en"),
personal: dictionary,
})
.use(require("retext-diacritics"))
.use(require("retext-indefinite-article"))
.use(require("retext-redundant-acronyms"))
.use(require("retext-sentence-spacing"), {
preferred: 1
})
]
];
if (process.env.NODE_ENV === "production") {
plugins.push([
"@theowenyoung/remark-lint-no-dead-urls",
{
checkIsOnline: false,
skipUrlPatterns: [
"http://localhost",
],
},
]);
}
const settings = {
bullet: '-',
commonmark: true,
emphasis: '_',
fence: '`',
incrementListMarker: true,
listItemIndent: 1,
strong: '*'
}
module.exports = {
plugins,
settings
};