/
.remarkrc.js
49 lines (48 loc) · 1.47 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
const fs = require("fs");
const unified = require("unified");
const headings = require("rehype-autolink-headings");
const dictionary = fs.readFileSync("./dictionary.txt");
const plugins = [
["remark-frontmatter", "yaml"],
[
"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")),
],
"remark-preset-lint-recommended",
"remark-preset-lint-markdown-style-guide",
["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", false],
["validate-links"],
];
if (process.env.NODE_ENV === "production") {
plugins.push([
"@theowenyoung/remark-lint-no-dead-urls",
{
checkIsOnline: false,
skipUrlPatterns: [
"https://github.com/actionsflow/actionsflow-workflow-default/generate",
"https://trello.com/app-key",
"http://localhost",
],
},
]);
}
module.exports = {
plugins,
};