Skip to content

Commit bf5054e

Browse files
author
markzegarelli
authored
Merge pull request #1105 from segmentio/vale
Adding Vale linter
2 parents 3ef8071 + a2c71a7 commit bf5054e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2762
-0
lines changed

.vale.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
StylesPath = vale-styles
2+
3+
Vocab = blog
4+
5+
[*.md]
6+
BasedOnStyles = Vale, write-good

vale-styles/Microsoft/AMPM.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
extends: existence
2+
message: Use 'AM' or 'PM' (preceded by a space).
3+
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
4+
level: error
5+
6+
nonword: true
7+
tokens:
8+
- '\d{1,2}[AP]M'
9+
- '\d{1,2} ?[ap]m'
10+
- '\d{1,2} ?[aApP]\.[mM]\.'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
extends: existence
2+
message: "Don't use language (such as '%s') that defines people by their disability."
3+
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
4+
5+
level: suggestion
6+
ignorecase: true
7+
tokens:
8+
- a victim of
9+
- able-bodied
10+
- affected by
11+
- an epileptic
12+
- crippled
13+
- disabled
14+
- dumb
15+
- handicapped
16+
- handicaps
17+
- healthy
18+
- lame
19+
- maimed
20+
- missing a limb
21+
- mute
22+
- normal
23+
- sight-impaired
24+
- stricken with
25+
- suffers from
26+
- vision-impaired

vale-styles/Microsoft/Acronyms.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
extends: conditional
2+
message: "'%s' has no definition."
3+
link: https://docs.microsoft.com/en-us/style-guide/acronyms
4+
5+
level: suggestion
6+
ignorecase: false
7+
# Ensures that the existence of 'first' implies the existence of 'second'.
8+
first: '\b([A-Z]{3,5})\b'
9+
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
10+
# ... with the exception of these:
11+
exceptions:
12+
- API
13+
- ASP
14+
- CLI
15+
- CPU
16+
- CSS
17+
- CSV
18+
- DEBUG
19+
- DOM
20+
- DPI
21+
- FAQ
22+
- GCC
23+
- GDB
24+
- GET
25+
- GPU
26+
- GTK
27+
- GUI
28+
- HTML
29+
- HTTP
30+
- HTTPS
31+
- IDE
32+
- JAR
33+
- JSON
34+
- JSX
35+
- LESS
36+
- LLDB
37+
- NET
38+
- NOTE
39+
- NVDA
40+
- OSS
41+
- PATH
42+
- PDF
43+
- PHP
44+
- POST
45+
- RAM
46+
- REPL
47+
- RSA
48+
- SCM
49+
- SCSS
50+
- SDK
51+
- SQL
52+
- SSH
53+
- SSL
54+
- SVG
55+
- TBD
56+
- TCP
57+
- TODO
58+
- URI
59+
- URL
60+
- USB
61+
- UTF
62+
- XML
63+
- XSS
64+
- YAML
65+
- ZIP

vale-styles/Microsoft/Adverbs.yml

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
extends: existence
2+
message: "Consider removing '%s'."
3+
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences
4+
ignorecase: true
5+
6+
level: warning
7+
action:
8+
name: remove
9+
tokens:
10+
- abnormally
11+
- absentmindedly
12+
- accidentally
13+
- adventurously
14+
- anxiously
15+
- arrogantly
16+
- awkwardly
17+
- bashfully
18+
- beautifully
19+
- bitterly
20+
- bleakly
21+
- blindly
22+
- blissfully
23+
- boastfully
24+
- boldly
25+
- bravely
26+
- briefly
27+
- brightly
28+
- briskly
29+
- broadly
30+
- busily
31+
- calmly
32+
- carefully
33+
- carelessly
34+
- cautiously
35+
- cheerfully
36+
- cleverly
37+
- closely
38+
- coaxingly
39+
- colorfully
40+
- continually
41+
- coolly
42+
- courageously
43+
- crossly
44+
- cruelly
45+
- curiously
46+
- daintily
47+
- dearly
48+
- deceivingly
49+
- deeply
50+
- defiantly
51+
- deliberately
52+
- delightfully
53+
- diligently
54+
- dimly
55+
- doubtfully
56+
- dreamily
57+
- easily
58+
- elegantly
59+
- energetically
60+
- enormously
61+
- enthusiastically
62+
- excitedly
63+
- extremely
64+
- fairly
65+
- faithfully
66+
- famously
67+
- ferociously
68+
- fervently
69+
- fiercely
70+
- fondly
71+
- foolishly
72+
- fortunately
73+
- frankly
74+
- frantically
75+
- freely
76+
- frenetically
77+
- frightfully
78+
- furiously
79+
- generally
80+
- generously
81+
- gently
82+
- gladly
83+
- gleefully
84+
- gracefully
85+
- gratefully
86+
- greatly
87+
- greedily
88+
- happily
89+
- hastily
90+
- healthily
91+
- heavily
92+
- helplessly
93+
- honestly
94+
- hopelessly
95+
- hungrily
96+
- innocently
97+
- inquisitively
98+
- intensely
99+
- intently
100+
- interestingly
101+
- inwardly
102+
- irritably
103+
- jaggedly
104+
- jealously
105+
- jovially
106+
- joyfully
107+
- joyously
108+
- jubilantly
109+
- judgmentally
110+
- justly
111+
- keenly
112+
- kiddingly
113+
- kindheartedly
114+
- knavishly
115+
- knowingly
116+
- knowledgeably
117+
- lazily
118+
- lightly
119+
- limply
120+
- lively
121+
- loftily
122+
- longingly
123+
- loosely
124+
- loudly
125+
- lovingly
126+
- loyally
127+
- madly
128+
- majestically
129+
- meaningfully
130+
- mechanically
131+
- merrily
132+
- miserably
133+
- mockingly
134+
- mortally
135+
- mysteriously
136+
- naturally
137+
- nearly
138+
- neatly
139+
- nervously
140+
- nicely
141+
- noisily
142+
- obediently
143+
- obnoxiously
144+
- oddly
145+
- offensively
146+
- optimistically
147+
- overconfidently
148+
- painfully
149+
- partially
150+
- patiently
151+
- perfectly
152+
- playfully
153+
- politely
154+
- poorly
155+
- positively
156+
- potentially
157+
- powerfully
158+
- promptly
159+
- properly
160+
- punctually
161+
- quaintly
162+
- queasily
163+
- queerly
164+
- questionably
165+
- quickly
166+
- quietly
167+
- quirkily
168+
- quizzically
169+
- randomly
170+
- rapidly
171+
- rarely
172+
- readily
173+
- really
174+
- reassuringly
175+
- recklessly
176+
- regularly
177+
- reluctantly
178+
- repeatedly
179+
- reproachfully
180+
- restfully
181+
- righteously
182+
- rightfully
183+
- rigidly
184+
- roughly
185+
- rudely
186+
- safely
187+
- scarcely
188+
- scarily
189+
- searchingly
190+
- sedately
191+
- seemingly
192+
- selfishly
193+
- separately
194+
- seriously
195+
- shakily
196+
- sharply
197+
- sheepishly
198+
- shrilly
199+
- shyly
200+
- silently
201+
- sleepily
202+
- slowly
203+
- smoothly
204+
- softly
205+
- solemnly
206+
- solidly
207+
- speedily
208+
- stealthily
209+
- sternly
210+
- strictly
211+
- suddenly
212+
- supposedly
213+
- surprisingly
214+
- suspiciously
215+
- sweetly
216+
- swiftly
217+
- sympathetically
218+
- tenderly
219+
- tensely
220+
- terribly
221+
- thankfully
222+
- thoroughly
223+
- thoughtfully
224+
- tightly
225+
- tremendously
226+
- triumphantly
227+
- truthfully
228+
- ultimately
229+
- unabashedly
230+
- unaccountably
231+
- unbearably
232+
- unethically
233+
- unexpectedly
234+
- unfortunately
235+
- unimpressively
236+
- unnaturally
237+
- unnecessarily
238+
- urgently
239+
- usefully
240+
- uselessly
241+
- utterly
242+
- vacantly
243+
- vaguely
244+
- vainly
245+
- valiantly
246+
- vastly
247+
- verbally
248+
- very
249+
- viciously
250+
- victoriously
251+
- violently
252+
- vivaciously
253+
- voluntarily
254+
- warmly
255+
- weakly
256+
- wearily
257+
- wetly
258+
- wholly
259+
- wildly
260+
- willfully
261+
- wisely
262+
- woefully
263+
- wonderfully
264+
- worriedly
265+
- yawningly
266+
- yearningly
267+
- yieldingly
268+
- youthfully
269+
- zealously
270+
- zestfully
271+
- zestily

vale-styles/Microsoft/Auto.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends: existence
2+
message: "In general, don't hyphenate '%s'."
3+
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto
4+
ignorecase: true
5+
6+
level: error
7+
action:
8+
name: convert
9+
params:
10+
- simple
11+
tokens:
12+
- 'auto-\w+'

0 commit comments

Comments
 (0)