vale: Update styles
This commit is contained in:
parent
ddfe364823
commit
f5094d3df2
16 changed files with 84 additions and 104 deletions
|
@ -1,12 +1,13 @@
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "Don't put a space before or after a dash."
|
message: "Don't put a space before or after a dash."
|
||||||
link: 'https://developers.google.com/style/dashes'
|
link: "https://developers.google.com/style/dashes"
|
||||||
nonword: true
|
nonword: true
|
||||||
level: error
|
level: error
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- remove
|
- trim
|
||||||
- ' '
|
- " "
|
||||||
tokens:
|
tokens:
|
||||||
- '\s[—–]\s'
|
- '\s[—–]\s'
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
extends: existence
|
|
||||||
message: "Use an em dash ('—') instead of '–'."
|
|
||||||
link: 'https://developers.google.com/style/dashes'
|
|
||||||
nonword: true
|
|
||||||
level: error
|
|
||||||
action:
|
|
||||||
name: edit
|
|
||||||
params:
|
|
||||||
- replace
|
|
||||||
- '-'
|
|
||||||
- '—'
|
|
||||||
tokens:
|
|
||||||
- '–'
|
|
|
@ -1,9 +1,12 @@
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "Don't use exclamation points in text."
|
message: "Don't use exclamation points in text."
|
||||||
link: 'https://developers.google.com/style/exclamation-points'
|
link: "https://developers.google.com/style/exclamation-points"
|
||||||
nonword: true
|
nonword: true
|
||||||
level: error
|
level: error
|
||||||
action:
|
action:
|
||||||
name: remove
|
name: edit
|
||||||
|
params:
|
||||||
|
- trim_right
|
||||||
|
- "!"
|
||||||
tokens:
|
tokens:
|
||||||
- '\w+!(?:\s|$)'
|
- '\w+!(?:\s|$)'
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "Don't put a period at the end of a heading."
|
message: "Don't put a period at the end of a heading."
|
||||||
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings'
|
link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings"
|
||||||
nonword: true
|
nonword: true
|
||||||
level: warning
|
level: warning
|
||||||
scope: heading
|
scope: heading
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- remove
|
- trim_right
|
||||||
- '.'
|
- "."
|
||||||
tokens:
|
tokens:
|
||||||
- '[a-z0-9][.]\s*$'
|
- '[a-z0-9][.]\s*$'
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "'%s' doesn't need a hyphen."
|
message: "'%s' doesn't need a hyphen."
|
||||||
link: 'https://developers.google.com/style/hyphens'
|
link: "https://developers.google.com/style/hyphens"
|
||||||
level: error
|
level: error
|
||||||
ignorecase: false
|
ignorecase: false
|
||||||
nonword: true
|
nonword: true
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- replace
|
- regex
|
||||||
- '-'
|
- "-"
|
||||||
- ' '
|
- " "
|
||||||
tokens:
|
tokens:
|
||||||
- '\s[^\s-]+ly-'
|
- '\b[^\s-]+ly-\w+\b'
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
extends: existence
|
extends: existence
|
||||||
message: "Don't use plurals in parentheses such as in '%s'."
|
message: "Don't use plurals in parentheses such as in '%s'."
|
||||||
link: 'https://developers.google.com/style/plurals-parentheses'
|
link: "https://developers.google.com/style/plurals-parentheses"
|
||||||
level: error
|
level: error
|
||||||
nonword: true
|
nonword: true
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- remove
|
- trim_right
|
||||||
- '(s)'
|
- "(s)"
|
||||||
tokens:
|
tokens:
|
||||||
- '\b\w+\(s\)'
|
- '\b\w+\(s\)'
|
||||||
|
|
|
@ -7,7 +7,7 @@ level: error
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- remove
|
- trim
|
||||||
- ' '
|
- " "
|
||||||
tokens:
|
tokens:
|
||||||
- '[—–]\s|\s[—–]'
|
- '\s[—–]\s|\s[—–]|[—–]\s'
|
||||||
|
|
|
@ -2,43 +2,45 @@ extends: substitution
|
||||||
message: "Consider using '%s' instead of '%s'."
|
message: "Consider using '%s' instead of '%s'."
|
||||||
ignorecase: true
|
ignorecase: true
|
||||||
level: error
|
level: error
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
swap:
|
swap:
|
||||||
(?:alumna|alumnus): graduate
|
(?:alumna|alumnus): graduate
|
||||||
(?:alumnae|alumni): graduates
|
(?:alumnae|alumni): graduates
|
||||||
air(?:m[ae]n|wom[ae]n): pilot(s)
|
air(?:m[ae]n|wom[ae]n): pilot(s)
|
||||||
anchor(?:m[ae]n|wom[ae]n): anchor(s)
|
anchor(?:m[ae]n|wom[ae]n): anchor(s)
|
||||||
authoress: author
|
authoress: author
|
||||||
camera(?:m[ae]n|wom[ae]n): camera operator(s)
|
camera(?:m[ae]n|wom[ae]n): camera operator(s)
|
||||||
chair(?:m[ae]n|wom[ae]n): chair(s)
|
chair(?:m[ae]n|wom[ae]n): chair(s)
|
||||||
congress(?:m[ae]n|wom[ae]n): member(s) of congress
|
congress(?:m[ae]n|wom[ae]n): member(s) of congress
|
||||||
door(?:m[ae]|wom[ae]n): concierge(s)
|
door(?:m[ae]|wom[ae]n): concierge(s)
|
||||||
draft(?:m[ae]n|wom[ae]n): drafter(s)
|
draft(?:m[ae]n|wom[ae]n): drafter(s)
|
||||||
fire(?:m[ae]n|wom[ae]n): firefighter(s)
|
fire(?:m[ae]n|wom[ae]n): firefighter(s)
|
||||||
fisher(?:m[ae]n|wom[ae]n): fisher(s)
|
fisher(?:m[ae]n|wom[ae]n): fisher(s)
|
||||||
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
|
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
|
||||||
garbage(?:m[ae]n|wom[ae]n): waste collector(s)
|
garbage(?:m[ae]n|wom[ae]n): waste collector(s)
|
||||||
lady lawyer: lawyer
|
lady lawyer: lawyer
|
||||||
ladylike: courteous
|
ladylike: courteous
|
||||||
landlord: building manager
|
landlord: building manager
|
||||||
mail(?:m[ae]n|wom[ae]n): mail carriers
|
mail(?:m[ae]n|wom[ae]n): mail carriers
|
||||||
man and wife: husband and wife
|
man and wife: husband and wife
|
||||||
man enough: strong enough
|
man enough: strong enough
|
||||||
mankind: human kind
|
mankind: human kind
|
||||||
manmade: manufactured
|
manmade: manufactured
|
||||||
manpower: personnel
|
manpower: personnel
|
||||||
men and girls: men and women
|
men and girls: men and women
|
||||||
middle(?:m[ae]n|wom[ae]n): intermediary
|
middle(?:m[ae]n|wom[ae]n): intermediary
|
||||||
news(?:m[ae]n|wom[ae]n): journalist(s)
|
news(?:m[ae]n|wom[ae]n): journalist(s)
|
||||||
ombuds(?:man|woman): ombuds
|
ombuds(?:man|woman): ombuds
|
||||||
oneupmanship: upstaging
|
oneupmanship: upstaging
|
||||||
poetess: poet
|
poetess: poet
|
||||||
police(?:m[ae]n|wom[ae]n): police officer(s)
|
police(?:m[ae]n|wom[ae]n): police officer(s)
|
||||||
repair(?:m[ae]n|wom[ae]n): technician(s)
|
repair(?:m[ae]n|wom[ae]n): technician(s)
|
||||||
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
|
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
|
||||||
service(?:m[ae]n|wom[ae]n): soldier(s)
|
service(?:m[ae]n|wom[ae]n): soldier(s)
|
||||||
steward(?:ess)?: flight attendant
|
steward(?:ess)?: flight attendant
|
||||||
tribes(?:m[ae]n|wom[ae]n): tribe member(s)
|
tribes(?:m[ae]n|wom[ae]n): tribe member(s)
|
||||||
waitress: waiter
|
waitress: waiter
|
||||||
woman doctor: doctor
|
woman doctor: doctor
|
||||||
woman scientist[s]?: scientist(s)
|
woman scientist[s]?: scientist(s)
|
||||||
work(?:m[ae]n|wom[ae]n): worker(s)
|
work(?:m[ae]n|wom[ae]n): worker(s)
|
||||||
|
|
|
@ -7,7 +7,7 @@ scope: heading
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- remove
|
- trim_right
|
||||||
- '.?!'
|
- ".?!"
|
||||||
tokens:
|
tokens:
|
||||||
- '[a-z][.?!](?:\s|$)'
|
- '[a-z][.?!](?:\s|$)'
|
||||||
|
|
|
@ -7,8 +7,8 @@ nonword: true
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- replace
|
- regex
|
||||||
- '-'
|
- "-"
|
||||||
- ' '
|
- " "
|
||||||
tokens:
|
tokens:
|
||||||
- '\s[^\s-]+ly-'
|
- '\b[^\s-]+ly-\w+\b'
|
||||||
|
|
|
@ -6,8 +6,8 @@ level: error
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- replace
|
- regex
|
||||||
- '-'
|
- "-"
|
||||||
- '–'
|
- "–"
|
||||||
tokens:
|
tokens:
|
||||||
- '\s-\d+\s'
|
- '(?<=\s)-\d+(?:\.\d+)?\b'
|
||||||
|
|
7
vale/.config/vale/styles/Microsoft/Plurals.yml
Normal file
7
vale/.config/vale/styles/Microsoft/Plurals.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
extends: existence
|
||||||
|
message: "Don't add '%s' to a singular noun. Use plural instead."
|
||||||
|
ignorecase: true
|
||||||
|
level: error
|
||||||
|
link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/s/s-es
|
||||||
|
raw:
|
||||||
|
- '\(s\)|\(es\)'
|
|
@ -1,13 +0,0 @@
|
||||||
extends: existence
|
|
||||||
message: "Use an en dash in a range of numbers."
|
|
||||||
link: https://docs.microsoft.com/en-us/style-guide/numbers
|
|
||||||
nonword: true
|
|
||||||
level: error
|
|
||||||
action:
|
|
||||||
name: edit
|
|
||||||
params:
|
|
||||||
- replace
|
|
||||||
- '-'
|
|
||||||
- '–'
|
|
||||||
tokens:
|
|
||||||
- '\b\d+\s?[-]\s?\d+\b'
|
|
|
@ -6,8 +6,8 @@ level: error
|
||||||
action:
|
action:
|
||||||
name: edit
|
name: edit
|
||||||
params:
|
params:
|
||||||
- replace
|
- regex
|
||||||
- '[-–]'
|
- "[-–]"
|
||||||
- 'to'
|
- "to"
|
||||||
tokens:
|
tokens:
|
||||||
- '\b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b'
|
- '\b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b'
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
extends: existence
|
|
||||||
message: "In most cases, use 'from' or 'through' to describe a range of numbers."
|
|
||||||
link: 'https://docs.microsoft.com/en-us/style-guide/numbers'
|
|
||||||
nonword: true
|
|
||||||
level: warning
|
|
||||||
tokens:
|
|
||||||
- '\b\d+\s?[-–]\s?\d+\b'
|
|
|
@ -15,7 +15,7 @@ swap:
|
||||||
all across: across
|
all across: across
|
||||||
all of a sudden: suddenly
|
all of a sudden: suddenly
|
||||||
all of these: these
|
all of these: these
|
||||||
all of: all
|
all of (?!a sudden|these): all
|
||||||
all-time record: record
|
all-time record: record
|
||||||
almost all: most
|
almost all: most
|
||||||
almost never: seldom
|
almost never: seldom
|
||||||
|
|
Loading…
Reference in a new issue