forked from nodejs/remark-preset-lint-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
81 lines (79 loc) · 2.44 KB
/
index.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
76
77
78
79
80
81
// @see https://github.com/nodejs/node/blob/master/doc/guides/doc-style-guide.md
"use strict";
// Add in rules alphabetically
module.exports.plugins = [
require("remark-lint"),
// Leave preset at the top so it can be overridden
require("remark-preset-lint-recommended"),
[require("remark-lint-blockquote-indentation"), 2],
[
require("remark-lint-checkbox-character-style"),
{
checked: "x",
unchecked: " ",
},
],
require("remark-lint-checkbox-content-indent"),
[require("remark-lint-code-block-style"), "fenced"],
require("remark-lint-definition-spacing"),
[
require("remark-lint-fenced-code-flag"),
{
flags: [
"bash",
"c",
"coffee",
"console",
"cpp",
"diff",
"http",
"js",
"json",
"markdown",
"powershell",
"r",
"text",
],
},
],
[require("remark-lint-fenced-code-marker"), "`"],
[require("remark-lint-file-extension"), "md"],
require("remark-lint-final-definition"),
[require("remark-lint-first-heading-level"), 1],
[require("remark-lint-heading-style"), "atx"],
[require("remark-lint-list-item-indent"), "space"],
require("remark-lint-maximum-line-length"),
require("remark-lint-no-consecutive-blank-lines"),
require("remark-lint-no-file-name-articles"),
require("remark-lint-no-file-name-consecutive-dashes"),
require("remark-lint-no-file-name-outer-dashes"),
require("remark-lint-no-heading-indent"),
require("remark-lint-no-multiple-toplevel-headings"),
require("remark-lint-no-shell-dollars"),
require("remark-lint-no-table-indentation"),
require("remark-lint-no-tabs"),
require("remark-lint-no-trailing-spaces"),
[
require("remark-lint-prohibited-strings"),
[
{ yes: "End-of-Life" },
{ yes: "GitHub" },
{ no: "hostname", yes: "host name" },
{ yes: "JavaScript" },
{ no: "Node", yes: "Node.js" },
{ yes: "Node.js" },
{ no: "Node[Jj][Ss]", yes: "Node.js" },
{ no: "Node\\.js's?", yes: "the Node.js" },
{ no: "[Nn]ote that", yes: "<nothing>" },
{ yes: "RFC" },
{ no: "[Rr][Ff][Cc]\\d+", yes: "RFC <number>" },
{ yes: "Unix" },
{ yes: "V8" },
],
],
require("remark-lint-rule-style"),
[require("remark-lint-strong-marker"), "*"],
[require("remark-lint-table-cell-padding"), "padded"],
require("remark-lint-table-pipes"),
[require("remark-lint-unordered-list-marker-style"), "*"],
];