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
|
||||
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
|
||||
level: error
|
||||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- ' '
|
||||
- trim
|
||||
- " "
|
||||
tokens:
|
||||
- '\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
|
||||
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
|
||||
level: error
|
||||
action:
|
||||
name: remove
|
||||
name: edit
|
||||
params:
|
||||
- trim_right
|
||||
- "!"
|
||||
tokens:
|
||||
- '\w+!(?:\s|$)'
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
extends: existence
|
||||
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
|
||||
level: warning
|
||||
scope: heading
|
||||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- '.'
|
||||
- trim_right
|
||||
- "."
|
||||
tokens:
|
||||
- '[a-z0-9][.]\s*$'
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
extends: existence
|
||||
message: "'%s' doesn't need a hyphen."
|
||||
link: 'https://developers.google.com/style/hyphens'
|
||||
link: "https://developers.google.com/style/hyphens"
|
||||
level: error
|
||||
ignorecase: false
|
||||
nonword: true
|
||||
action:
|
||||
name: edit
|
||||
params:
|
||||
- replace
|
||||
- '-'
|
||||
- ' '
|
||||
- regex
|
||||
- "-"
|
||||
- " "
|
||||
tokens:
|
||||
- '\s[^\s-]+ly-'
|
||||
- '\b[^\s-]+ly-\w+\b'
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
extends: existence
|
||||
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
|
||||
nonword: true
|
||||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- '(s)'
|
||||
- trim_right
|
||||
- "(s)"
|
||||
tokens:
|
||||
- '\b\w+\(s\)'
|
||||
|
|
|
@ -7,7 +7,7 @@ level: error
|
|||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- ' '
|
||||
- trim
|
||||
- " "
|
||||
tokens:
|
||||
- '[—–]\s|\s[—–]'
|
||||
- '\s[—–]\s|\s[—–]|[—–]\s'
|
||||
|
|
|
@ -2,6 +2,8 @@ extends: substitution
|
|||
message: "Consider using '%s' instead of '%s'."
|
||||
ignorecase: true
|
||||
level: error
|
||||
action:
|
||||
name: replace
|
||||
swap:
|
||||
(?:alumna|alumnus): graduate
|
||||
(?:alumnae|alumni): graduates
|
||||
|
|
|
@ -7,7 +7,7 @@ scope: heading
|
|||
action:
|
||||
name: edit
|
||||
params:
|
||||
- remove
|
||||
- '.?!'
|
||||
- trim_right
|
||||
- ".?!"
|
||||
tokens:
|
||||
- '[a-z][.?!](?:\s|$)'
|
||||
|
|
|
@ -7,8 +7,8 @@ nonword: true
|
|||
action:
|
||||
name: edit
|
||||
params:
|
||||
- replace
|
||||
- '-'
|
||||
- ' '
|
||||
- regex
|
||||
- "-"
|
||||
- " "
|
||||
tokens:
|
||||
- '\s[^\s-]+ly-'
|
||||
- '\b[^\s-]+ly-\w+\b'
|
||||
|
|
|
@ -6,8 +6,8 @@ level: error
|
|||
action:
|
||||
name: edit
|
||||
params:
|
||||
- replace
|
||||
- '-'
|
||||
- '–'
|
||||
- regex
|
||||
- "-"
|
||||
- "–"
|
||||
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:
|
||||
name: edit
|
||||
params:
|
||||
- replace
|
||||
- '[-–]'
|
||||
- 'to'
|
||||
- regex
|
||||
- "[-–]"
|
||||
- "to"
|
||||
tokens:
|
||||
- '\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 of a sudden: suddenly
|
||||
all of these: these
|
||||
all of: all
|
||||
all of (?!a sudden|these): all
|
||||
all-time record: record
|
||||
almost all: most
|
||||
almost never: seldom
|
||||
|
|
Loading…
Reference in a new issue