-
Notifications
You must be signed in to change notification settings - Fork 6
/
.remarkrc.mjs
85 lines (85 loc) · 2.29 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
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
80
81
82
83
84
85
import retext from "remark-retext"
import { Parser } from "retext-english"
import dictionary from "dictionary-en"
import { readFileSync } from "node:fs"
export default {
plugins: [
"remark-lint",
"remark-preset-lint-consistent",
"remark-preset-lint-markdown-style-guide",
"remark-preset-lint-recommended",
"remark-preset-prettier",
"remark-frontmatter",
"remark-gfm",
"remark-validate-links",
"remark-lint-no-duplicate-headings-in-section",
["remark-lint-no-duplicate-headings", false],
["remark-lint-heading-style", false],
["remark-lint-list-item-indent", false],
["remark-lint-no-undefined-references", false],
["remark-lint-no-shell-dollars", false],
["remark-lint-maximum-heading-length", 73],
[retext, Parser],
"retext-diacritics",
"retext-indefinite-article",
"retext-redundant-acronyms",
"retext-repeated-words",
"retext-sentence-spacing",
["retext-quotes", { preferred: "straight" }],
["retext-contractions", { straight: true }],
["retext-passive", { ignore: ["read", "set"] }],
["retext-profanities", { ignore: ["execute", "executed", "hook"] }],
[
"retext-simplify",
{
ignore: [
"component",
"implement",
"render",
"function",
"request",
"type",
"immediately",
"observe",
"perform",
// TODO: Reduce this list
"in order to",
"caveat",
"consequently",
"maintain",
"equivalent",
"subsequent",
"similar to",
"e.g.",
"multiple",
"additional",
"represents",
"option",
"notify",
"previous",
"modify",
"very",
],
},
],
[
"retext-equality",
{
noBinary: true,
// TODO: Reduce this list
ignore: ["primitive", "just", "easy", "easily", "straightforward", "invalid", "obvious", "host", "hosts"],
},
],
// TODO: Lower this threshold to 5 / 7
["retext-readability", { threshold: 6 / 7 }],
[
"retext-spell",
{
dictionary,
ignore: readFileSync(".spelling", "utf-8")
.split("\n")
.filter((l) => !l.startsWith("#")),
},
],
],
}