diff --git a/vale/.config/vale/styles/Google/EmDash.yml b/vale/.config/vale/styles/Google/EmDash.yml index 1befe72..5a81fb0 100644 --- a/vale/.config/vale/styles/Google/EmDash.yml +++ b/vale/.config/vale/styles/Google/EmDash.yml @@ -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' + diff --git a/vale/.config/vale/styles/Google/EnDash.yml b/vale/.config/vale/styles/Google/EnDash.yml deleted file mode 100644 index b314dc4..0000000 --- a/vale/.config/vale/styles/Google/EnDash.yml +++ /dev/null @@ -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: - - '–' diff --git a/vale/.config/vale/styles/Google/Exclamation.yml b/vale/.config/vale/styles/Google/Exclamation.yml index eea5fd2..b4e4a1f 100644 --- a/vale/.config/vale/styles/Google/Exclamation.yml +++ b/vale/.config/vale/styles/Google/Exclamation.yml @@ -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|$)' diff --git a/vale/.config/vale/styles/Google/HeadingPunctuation.yml b/vale/.config/vale/styles/Google/HeadingPunctuation.yml index b538be5..c172986 100644 --- a/vale/.config/vale/styles/Google/HeadingPunctuation.yml +++ b/vale/.config/vale/styles/Google/HeadingPunctuation.yml @@ -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*$' diff --git a/vale/.config/vale/styles/Google/LyHyphens.yml b/vale/.config/vale/styles/Google/LyHyphens.yml index ac8f557..50dacb4 100644 --- a/vale/.config/vale/styles/Google/LyHyphens.yml +++ b/vale/.config/vale/styles/Google/LyHyphens.yml @@ -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' diff --git a/vale/.config/vale/styles/Google/OptionalPlurals.yml b/vale/.config/vale/styles/Google/OptionalPlurals.yml index f858ea6..4a8767d 100644 --- a/vale/.config/vale/styles/Google/OptionalPlurals.yml +++ b/vale/.config/vale/styles/Google/OptionalPlurals.yml @@ -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\)' diff --git a/vale/.config/vale/styles/Microsoft/Dashes.yml b/vale/.config/vale/styles/Microsoft/Dashes.yml index 2894cf7..72b05ba 100644 --- a/vale/.config/vale/styles/Microsoft/Dashes.yml +++ b/vale/.config/vale/styles/Microsoft/Dashes.yml @@ -7,7 +7,7 @@ level: error action: name: edit params: - - remove - - ' ' + - trim + - " " tokens: - - '[—–]\s|\s[—–]' + - '\s[—–]\s|\s[—–]|[—–]\s' diff --git a/vale/.config/vale/styles/Microsoft/GenderBias.yml b/vale/.config/vale/styles/Microsoft/GenderBias.yml index 3d873aa..a7f4888 100644 --- a/vale/.config/vale/styles/Microsoft/GenderBias.yml +++ b/vale/.config/vale/styles/Microsoft/GenderBias.yml @@ -2,43 +2,45 @@ extends: substitution message: "Consider using '%s' instead of '%s'." ignorecase: true level: error +action: + name: replace swap: - (?:alumna|alumnus): graduate - (?:alumnae|alumni): graduates - air(?:m[ae]n|wom[ae]n): pilot(s) - anchor(?:m[ae]n|wom[ae]n): anchor(s) - authoress: author - camera(?:m[ae]n|wom[ae]n): camera operator(s) - chair(?:m[ae]n|wom[ae]n): chair(s) + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) congress(?:m[ae]n|wom[ae]n): member(s) of congress - door(?:m[ae]|wom[ae]n): concierge(s) - draft(?:m[ae]n|wom[ae]n): drafter(s) - fire(?:m[ae]n|wom[ae]n): firefighter(s) - fisher(?:m[ae]n|wom[ae]n): fisher(s) - fresh(?:m[ae]n|wom[ae]n): first-year student(s) - garbage(?:m[ae]n|wom[ae]n): waste collector(s) - lady lawyer: lawyer - ladylike: courteous - landlord: building manager - mail(?:m[ae]n|wom[ae]n): mail carriers - man and wife: husband and wife - man enough: strong enough - mankind: human kind - manmade: manufactured - manpower: personnel - men and girls: men and women - middle(?:m[ae]n|wom[ae]n): intermediary - news(?:m[ae]n|wom[ae]n): journalist(s) - ombuds(?:man|woman): ombuds - oneupmanship: upstaging - poetess: poet - police(?:m[ae]n|wom[ae]n): police officer(s) - repair(?:m[ae]n|wom[ae]n): technician(s) - sales(?:m[ae]n|wom[ae]n): salesperson or sales people - service(?:m[ae]n|wom[ae]n): soldier(s) - steward(?:ess)?: flight attendant - tribes(?:m[ae]n|wom[ae]n): tribe member(s) - waitress: waiter - woman doctor: doctor - woman scientist[s]?: scientist(s) - work(?:m[ae]n|wom[ae]n): worker(s) + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/vale/.config/vale/styles/Microsoft/HeadingPunctuation.yml b/vale/.config/vale/styles/Microsoft/HeadingPunctuation.yml index af04b02..eea912a 100644 --- a/vale/.config/vale/styles/Microsoft/HeadingPunctuation.yml +++ b/vale/.config/vale/styles/Microsoft/HeadingPunctuation.yml @@ -7,7 +7,7 @@ scope: heading action: name: edit params: - - remove - - '.?!' + - trim_right + - ".?!" tokens: - '[a-z][.?!](?:\s|$)' diff --git a/vale/.config/vale/styles/Microsoft/Hyphens.yml b/vale/.config/vale/styles/Microsoft/Hyphens.yml index 90bbb5d..7e5731c 100644 --- a/vale/.config/vale/styles/Microsoft/Hyphens.yml +++ b/vale/.config/vale/styles/Microsoft/Hyphens.yml @@ -7,8 +7,8 @@ nonword: true action: name: edit params: - - replace - - '-' - - ' ' + - regex + - "-" + - " " tokens: - - '\s[^\s-]+ly-' + - '\b[^\s-]+ly-\w+\b' diff --git a/vale/.config/vale/styles/Microsoft/Negative.yml b/vale/.config/vale/styles/Microsoft/Negative.yml index d6ff2f2..d73221f 100644 --- a/vale/.config/vale/styles/Microsoft/Negative.yml +++ b/vale/.config/vale/styles/Microsoft/Negative.yml @@ -6,8 +6,8 @@ level: error action: name: edit params: - - replace - - '-' - - '–' + - regex + - "-" + - "–" tokens: - - '\s-\d+\s' + - '(?<=\s)-\d+(?:\.\d+)?\b' diff --git a/vale/.config/vale/styles/Microsoft/Plurals.yml b/vale/.config/vale/styles/Microsoft/Plurals.yml new file mode 100644 index 0000000..1bb6660 --- /dev/null +++ b/vale/.config/vale/styles/Microsoft/Plurals.yml @@ -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\)' diff --git a/vale/.config/vale/styles/Microsoft/RangeFormat.yml b/vale/.config/vale/styles/Microsoft/RangeFormat.yml deleted file mode 100644 index f1d736e..0000000 --- a/vale/.config/vale/styles/Microsoft/RangeFormat.yml +++ /dev/null @@ -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' diff --git a/vale/.config/vale/styles/Microsoft/RangeTime.yml b/vale/.config/vale/styles/Microsoft/RangeTime.yml index cdd4b33..72d8bbf 100644 --- a/vale/.config/vale/styles/Microsoft/RangeTime.yml +++ b/vale/.config/vale/styles/Microsoft/RangeTime.yml @@ -6,8 +6,8 @@ level: error action: name: edit params: - - replace - - '[-–]' - - 'to' + - regex + - "[-–]" + - "to" tokens: - '\b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b' diff --git a/vale/.config/vale/styles/Microsoft/Ranges.yml b/vale/.config/vale/styles/Microsoft/Ranges.yml deleted file mode 100644 index 67d9702..0000000 --- a/vale/.config/vale/styles/Microsoft/Ranges.yml +++ /dev/null @@ -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' diff --git a/vale/.config/vale/styles/Microsoft/Wordiness.yml b/vale/.config/vale/styles/Microsoft/Wordiness.yml index 22a4c93..9facc10 100644 --- a/vale/.config/vale/styles/Microsoft/Wordiness.yml +++ b/vale/.config/vale/styles/Microsoft/Wordiness.yml @@ -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