-
Notifications
You must be signed in to change notification settings - Fork 6
/
.remarkrc.yml
131 lines (129 loc) · 4.32 KB
/
.remarkrc.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
plugins:
- preset-lint-recommended
- remark-preset-lint-markdown-style-guide
- [ remark-lint-validate-internal-links, {
docsRoot: 'content/en',
staticRoot: 'static',
staticFilesExtensions: ['.json', '.js', '.yaml', '.sh', '.html', '.zip'],
ignoreLinksThatStartWith: [
'mailto', 'http', 'chrome'
],
hugoShortcodesDirectory: "layouts/shortcodes/variables"
}]
# - [ remark-lint-no-dead-urls, {
# skipLocalhost: true,
# # gotOptions: {
# # concurrency: 1,
# # timeout: {
# # lookup: 100,
# # connect: 50,
# # secureConnect: 50,
# # socket: 1000,
# # send: 5000,
# # response: 1000
# # }
# # }
# }]
# https://github.com/remarkjs/remark-lint/blob/main/doc/rules.md
- [ 'remark-frontmatter', 'yaml' ]
- [ 'remark-lint-heading-style', 'atx' ]
- [ 'remark-lint-maximum-line-length', false ]
- [ 'remark-lint-no-emphasis-as-heading' ]
- [ 'remark-lint-no-file-name-irregular-characters', '\\.a-zA-Z0-9_']
- [ 'remark-lint-emphasis-marker', '_' ]
- [ 'remark-lint-unordered-list-marker-style', '*' ]
- [ 'remark-lint-list-item-indent', 'space' ]
- [ 'remark-lint-list-item-spacing', false ]
- [ 'remark-lint-no-empty-sections' ]
- [ 'remark-lint-no-tabs' ]
- [ 'remark-lint-first-heading-level', 2 ]
- [ 'remark-lint-heading-sentence-case', [
'API Builder',
'Axway',
'APIs',
'Swagger',
'Gmail',
'OneDrive',
'Google',
'Docker',
'Splunk',
'API',
'ID',
'GUID',
'API Manager',
'HTTP',
'OpenAPI',
'Endpoint',
'encodeURI',
'Windows',
'Amplify Runtime Services',
'CRUD',
'REST',
'JSON',
'Kafka',
'Solace',
'XSLT',
'XML',
'JSONPath',
'JavaScript',
'OAuth',
'MBS',
'ARS',
'CLI',
'doT',
'HTML',
'JWT',
'URI'
]]
# Lots of false positives. Sometimes it's expected but we don't want
# this to be checking URLs, and want it to be a bit more flexible.
# Otherwise it's really useful for catching wrong usage of words.
# Consider replacing with some other sort of dictionary checker.
- [ 'remark-lint-prohibited-strings', [
{ no: '[fF]low node', yes: 'flow-node' },
{ no: '[fF]low trigger', yes: 'flow-trigger' },
# { yes: 'JavaScript' },
{ yes: 'Node.js' },
{ yes: 'npm' },
{ yes: 'CLI', ignoreNextTo: '-' },
{ yes: 'unix' },
{ yes: 'GitHub' },
# { yes: 'Docker' },
{ yes: 'Axway', ignoreNextTo: '-' },
{ yes: 'Amplify', ignoreNextTo: '-' },
# { yes: 'Oracle', ignoreNextTo: '-' },
# { yes: 'JSONPath' },
# the plugin doesn't handle URLs well
# { yes: 'doT' },
{ yes: 'OAuth' },
{ no: 'JSON path', yes: 'JSONPath'},
# { yes: 'JSONPath' },
# the plugin doesn't handle regex too well, so wasn't able to use
# negative lookbehind for use of 'builder' without preceding 'API'.
# https://github.com/Trott/remark-lint-prohibited-strings/blob/main/index.js
{ no: 'builder', yes: 'Builder', ignoreNextTo: '-' },
{ yes: 'API Builder' }, # case insensitive
{ no: 'API First', yes: 'API-first' },
{ no: '[fF]alsey', yes: 'falsy' },
{ no: "[cC]an't", yes: 'cannot' },
{ no: "[iI]t's", yes: 'it is' },
{ no: "[tT]hat's", yes: 'that is' },
{ no: "[wW]hat's", yes: 'what is' },
{ no: "[wW]on't", yes: 'will not' },
{ no: "[yY]ou'd", yes: 'you would' },
{ no: "[yY]ou're", yes: 'you are' },
{ no: "[wR]e're", yes: 'we are' },
{ no: "(\\w+)'ve", yes: '$1 have', replaceCaptureGroups: true },
{ no: "(\\w+(?<!ca))n't", yes: '$1 not', replaceCaptureGroups: true },
{ no: "(\\w+)'ll", yes: '$1 will', replaceCaptureGroups: true },
{ no: "(\\w+)'d", yes: '$1 would', replaceCaptureGroups: true },
{ no: "(\\w+)'re", yes: '$1 are', replaceCaptureGroups: true },
{ no: 'oas|OAS', yes: 'OpenAPI' }
]]
# We need to figure out what to do with these rules
# too many exceptions
- [ 'remark-lint-heading-sentence-case', false ]
# Buggy AF for multi-indented lists
- [ 'remark-lint-list-item-content-indent', false ]
# shortcodes throw this off
- [ 'remark-lint-maximum-heading-length', false ]