Skip to content

Commit a6e9cba

Browse files
honzajavorekpatrikbraborec
authored andcommitted
feat: update Microsoft styles (#1902)
Extracted from #1890
1 parent c70eb2a commit a6e9cba

17 files changed

+100
-221
lines changed

.github/styles/Microsoft/Accessibility.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ ignorecase: true
66
tokens:
77
- a victim of
88
- able-bodied
9-
- affected by
109
- an epileptic
10+
- birth defect
1111
- crippled
12+
- differently abled
1213
- disabled
1314
- dumb
1415
- handicapped
1516
- handicaps
16-
- healthy
17+
- healthy person
18+
- hearing-impaired
1719
- lame
1820
- maimed
21+
- mentally handicapped
1922
- missing a limb
2023
- mute
21-
- normal
24+
- non-verbal
25+
- normal person
2226
- sight-impaired
27+
- slow learner
2328
- stricken with
2429
- suffers from
2530
- vision-impaired

.github/styles/Microsoft/Adverbs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extends: existence
2-
message: "Consider removing '%s'."
2+
message: "Remove '%s' if it's not important to the meaning of the statement."
33
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences
44
ignorecase: true
55
level: warning
@@ -54,6 +54,7 @@ tokens:
5454
- doubtfully
5555
- dreamily
5656
- easily
57+
- effectively
5758
- elegantly
5859
- energetically
5960
- enormously
@@ -164,6 +165,7 @@ tokens:
164165
- quickly
165166
- quietly
166167
- quirkily
168+
- quite
167169
- quizzically
168170
- randomly
169171
- rapidly

.github/styles/Microsoft/ComplexWords.yml

Lines changed: 0 additions & 120 deletions
This file was deleted.

.github/styles/Microsoft/Dashes.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ level: error
77
action:
88
name: edit
99
params:
10-
- remove
11-
- ' '
10+
- trim
11+
- " "
1212
tokens:
13-
- '[—–]\s|\s[—–]'
13+
- '\s[—–]\s|\s[—–]|[—–]\s'

.github/styles/Microsoft/FirstPerson.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ignorecase: true
55
level: warning
66
nonword: true
77
tokens:
8-
- (?:^|\s)I\s
9-
- (?:^|\s)I,\s
8+
- (?:^|\s)I(?=\s)
9+
- (?:^|\s)I(?=,\s)
1010
- \bI'd\b
1111
- \bI'll\b
1212
- \bI'm\b

.github/styles/Microsoft/GenderBias.yml

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,41 @@ extends: substitution
22
message: "Consider using '%s' instead of '%s'."
33
ignorecase: true
44
level: error
5+
action:
6+
name: replace
57
swap:
6-
(?:alumna|alumnus): graduate
7-
(?:alumnae|alumni): graduates
8-
air(?:m[ae]n|wom[ae]n): pilot(s)
9-
anchor(?:m[ae]n|wom[ae]n): anchor(s)
10-
authoress: author
11-
camera(?:m[ae]n|wom[ae]n): camera operator(s)
12-
chair(?:m[ae]n|wom[ae]n): chair(s)
13-
congress(?:m[ae]n|wom[ae]n): member(s) of congress
14-
door(?:m[ae]|wom[ae]n): concierge(s)
15-
draft(?:m[ae]n|wom[ae]n): drafter(s)
16-
fire(?:m[ae]n|wom[ae]n): firefighter(s)
17-
fisher(?:m[ae]n|wom[ae]n): fisher(s)
18-
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
19-
garbage(?:m[ae]n|wom[ae]n): waste collector(s)
20-
lady lawyer: lawyer
21-
ladylike: courteous
22-
landlord: building manager
23-
mail(?:m[ae]n|wom[ae]n): mail carriers
24-
man and wife: husband and wife
25-
man enough: strong enough
26-
mankind: human kind
27-
manmade: manufactured
28-
manpower: personnel
29-
men and girls: men and women
30-
middle(?:m[ae]n|wom[ae]n): intermediary
31-
news(?:m[ae]n|wom[ae]n): journalist(s)
32-
ombuds(?:man|woman): ombuds
33-
oneupmanship: upstaging
34-
poetess: poet
35-
police(?:m[ae]n|wom[ae]n): police officer(s)
36-
repair(?:m[ae]n|wom[ae]n): technician(s)
37-
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
38-
service(?:m[ae]n|wom[ae]n): soldier(s)
39-
steward(?:ess)?: flight attendant
40-
tribes(?:m[ae]n|wom[ae]n): tribe member(s)
41-
waitress: waiter
42-
woman doctor: doctor
43-
woman scientist[s]?: scientist(s)
44-
work(?:m[ae]n|wom[ae]n): worker(s)
8+
(?:alumna|alumnus): graduate
9+
(?:alumnae|alumni): graduates
10+
air(?:m[ae]n|wom[ae]n): pilot(s)
11+
anchor(?:m[ae]n|wom[ae]n): anchor(s)
12+
authoress: author
13+
camera(?:m[ae]n|wom[ae]n): camera operator(s)
14+
door(?:m[ae]|wom[ae]n): concierge(s)
15+
draft(?:m[ae]n|wom[ae]n): drafter(s)
16+
fire(?:m[ae]n|wom[ae]n): firefighter(s)
17+
fisher(?:m[ae]n|wom[ae]n): fisher(s)
18+
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
19+
garbage(?:m[ae]n|wom[ae]n): waste collector(s)
20+
lady lawyer: lawyer
21+
ladylike: courteous
22+
mail(?:m[ae]n|wom[ae]n): mail carriers
23+
man and wife: husband and wife
24+
man enough: strong enough
25+
mankind: human kind
26+
manmade: manufactured
27+
manpower: personnel
28+
middle(?:m[ae]n|wom[ae]n): intermediary
29+
news(?:m[ae]n|wom[ae]n): journalist(s)
30+
ombuds(?:man|woman): ombuds
31+
oneupmanship: upstaging
32+
poetess: poet
33+
police(?:m[ae]n|wom[ae]n): police officer(s)
34+
repair(?:m[ae]n|wom[ae]n): technician(s)
35+
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
36+
service(?:m[ae]n|wom[ae]n): soldier(s)
37+
steward(?:ess)?: flight attendant
38+
tribes(?:m[ae]n|wom[ae]n): tribe member(s)
39+
waitress: waiter
40+
woman doctor: doctor
41+
woman scientist[s]?: scientist(s)
42+
work(?:m[ae]n|wom[ae]n): worker(s)

.github/styles/Microsoft/HeadingPunctuation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ scope: heading
77
action:
88
name: edit
99
params:
10-
- remove
11-
- '.?!'
10+
- trim_right
11+
- ".?!"
1212
tokens:
13-
- '[a-z][.?!](?:\s|$)'
13+
- "[a-z][.?!]$"

.github/styles/Microsoft/Hyphens.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ nonword: true
77
action:
88
name: edit
99
params:
10-
- replace
11-
- '-'
12-
- ' '
10+
- regex
11+
- "-"
12+
- " "
1313
tokens:
14-
- '\s[^\s-]+ly-'
14+
- '\b[^\s-]+ly-\w+\b'

.github/styles/Microsoft/Negative.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ level: error
66
action:
77
name: edit
88
params:
9-
- replace
10-
- '-'
11-
- ''
9+
- regex
10+
- "-"
11+
- ""
1212
tokens:
13-
- '\s-\d+\s'
13+
- '(?<=\s)-\d+(?:\.\d+)?\b'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: existence
2+
message: "Don't add '%s' to a singular noun. Use plural instead."
3+
ignorecase: true
4+
level: error
5+
link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/s/s-es
6+
raw:
7+
- '\(s\)|\(es\)'

0 commit comments

Comments
 (0)