From 6d14d5f65c0c107a33fe900f728c95c0c9c9fc8a Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 14:34:14 +0200 Subject: [PATCH 1/7] Add vale.ini with initial style The initial style is based on Google, proselint and write-good. This fixes #141. --- .vale.ini | 13 + styles/Google/AMPM.yml | 9 + styles/Google/Acronyms.yml | 64 +++ styles/Google/Colons.yml | 8 + styles/Google/Contractions.yml | 30 + styles/Google/DateFormat.yml | 9 + styles/Google/Ellipses.yml | 9 + styles/Google/EmDash.yml | 12 + styles/Google/EnDash.yml | 13 + styles/Google/Exclamation.yml | 9 + styles/Google/FirstPerson.yml | 13 + styles/Google/Gender.yml | 9 + styles/Google/GenderBias.yml | 47 ++ styles/Google/HeadingPunctuation.yml | 13 + styles/Google/Headings.yml | 29 + styles/Google/Latin.yml | 11 + styles/Google/LyHyphens.yml | 14 + styles/Google/OptionalPlurals.yml | 12 + styles/Google/Ordinal.yml | 7 + styles/Google/OxfordComma.yml | 7 + styles/Google/Parens.yml | 7 + styles/Google/Passive.yml | 184 +++++++ styles/Google/Periods.yml | 7 + styles/Google/Quotes.yml | 7 + styles/Google/Ranges.yml | 7 + styles/Google/Semicolons.yml | 8 + styles/Google/Slang.yml | 11 + styles/Google/Spacing.yml | 10 + styles/Google/Spelling.yml | 10 + styles/Google/Units.yml | 8 + styles/Google/We.yml | 11 + styles/Google/Will.yml | 7 + styles/Google/WordList.yml | 81 +++ styles/Google/meta.json | 4 + styles/Google/vocab.txt | 0 styles/Vocab/Docs/accept.txt | 3 + styles/Vocab/Docs/reject.txt | 1 + styles/proselint/Airlinese.yml | 8 + styles/proselint/AnimalLabels.yml | 48 ++ styles/proselint/Annotations.yml | 9 + styles/proselint/Apologizing.yml | 8 + styles/proselint/Archaisms.yml | 52 ++ styles/proselint/But.yml | 8 + styles/proselint/Cliches.yml | 782 +++++++++++++++++++++++++++ styles/proselint/CorporateSpeak.yml | 30 + styles/proselint/Currency.yml | 5 + styles/proselint/Cursing.yml | 15 + styles/proselint/DateCase.yml | 7 + styles/proselint/DateMidnight.yml | 7 + styles/proselint/DateRedundancy.yml | 10 + styles/proselint/DateSpacing.yml | 7 + styles/proselint/DenizenLabels.yml | 52 ++ styles/proselint/Diacritical.yml | 95 ++++ styles/proselint/GenderBias.yml | 45 ++ styles/proselint/GroupTerms.yml | 39 ++ styles/proselint/Hedging.yml | 8 + styles/proselint/Hyperbole.yml | 6 + styles/proselint/Jargon.yml | 11 + styles/proselint/LGBTOffensive.yml | 13 + styles/proselint/LGBTTerms.yml | 15 + styles/proselint/Malapropisms.yml | 8 + styles/proselint/Needless.yml | 358 ++++++++++++ styles/proselint/Nonwords.yml | 38 ++ styles/proselint/Oxymorons.yml | 22 + styles/proselint/P-Value.yml | 6 + styles/proselint/RASSyndrome.yml | 30 + styles/proselint/README.md | 12 + styles/proselint/Skunked.yml | 13 + styles/proselint/Spelling.yml | 17 + styles/proselint/Typography.yml | 11 + styles/proselint/Uncomparables.yml | 50 ++ styles/proselint/Very.yml | 6 + styles/proselint/meta.json | 17 + styles/write-good/Cliches.yml | 702 ++++++++++++++++++++++++ styles/write-good/E-Prime.yml | 32 ++ styles/write-good/Illusions.yml | 11 + styles/write-good/Passive.yml | 183 +++++++ styles/write-good/README.md | 27 + styles/write-good/So.yml | 5 + styles/write-good/ThereIs.yml | 6 + styles/write-good/TooWordy.yml | 221 ++++++++ styles/write-good/Weasel.yml | 207 +++++++ styles/write-good/meta.json | 4 + 83 files changed, 3970 insertions(+) create mode 100644 .vale.ini create mode 100644 styles/Google/AMPM.yml create mode 100644 styles/Google/Acronyms.yml create mode 100644 styles/Google/Colons.yml create mode 100644 styles/Google/Contractions.yml create mode 100644 styles/Google/DateFormat.yml create mode 100644 styles/Google/Ellipses.yml create mode 100644 styles/Google/EmDash.yml create mode 100644 styles/Google/EnDash.yml create mode 100644 styles/Google/Exclamation.yml create mode 100644 styles/Google/FirstPerson.yml create mode 100644 styles/Google/Gender.yml create mode 100644 styles/Google/GenderBias.yml create mode 100644 styles/Google/HeadingPunctuation.yml create mode 100644 styles/Google/Headings.yml create mode 100644 styles/Google/Latin.yml create mode 100644 styles/Google/LyHyphens.yml create mode 100644 styles/Google/OptionalPlurals.yml create mode 100644 styles/Google/Ordinal.yml create mode 100644 styles/Google/OxfordComma.yml create mode 100644 styles/Google/Parens.yml create mode 100644 styles/Google/Passive.yml create mode 100644 styles/Google/Periods.yml create mode 100644 styles/Google/Quotes.yml create mode 100644 styles/Google/Ranges.yml create mode 100644 styles/Google/Semicolons.yml create mode 100644 styles/Google/Slang.yml create mode 100644 styles/Google/Spacing.yml create mode 100644 styles/Google/Spelling.yml create mode 100644 styles/Google/Units.yml create mode 100644 styles/Google/We.yml create mode 100644 styles/Google/Will.yml create mode 100644 styles/Google/WordList.yml create mode 100644 styles/Google/meta.json create mode 100644 styles/Google/vocab.txt create mode 100644 styles/Vocab/Docs/accept.txt create mode 100644 styles/Vocab/Docs/reject.txt create mode 100644 styles/proselint/Airlinese.yml create mode 100644 styles/proselint/AnimalLabels.yml create mode 100644 styles/proselint/Annotations.yml create mode 100644 styles/proselint/Apologizing.yml create mode 100644 styles/proselint/Archaisms.yml create mode 100644 styles/proselint/But.yml create mode 100644 styles/proselint/Cliches.yml create mode 100644 styles/proselint/CorporateSpeak.yml create mode 100644 styles/proselint/Currency.yml create mode 100644 styles/proselint/Cursing.yml create mode 100644 styles/proselint/DateCase.yml create mode 100644 styles/proselint/DateMidnight.yml create mode 100644 styles/proselint/DateRedundancy.yml create mode 100644 styles/proselint/DateSpacing.yml create mode 100644 styles/proselint/DenizenLabels.yml create mode 100644 styles/proselint/Diacritical.yml create mode 100644 styles/proselint/GenderBias.yml create mode 100644 styles/proselint/GroupTerms.yml create mode 100644 styles/proselint/Hedging.yml create mode 100644 styles/proselint/Hyperbole.yml create mode 100644 styles/proselint/Jargon.yml create mode 100644 styles/proselint/LGBTOffensive.yml create mode 100644 styles/proselint/LGBTTerms.yml create mode 100644 styles/proselint/Malapropisms.yml create mode 100644 styles/proselint/Needless.yml create mode 100644 styles/proselint/Nonwords.yml create mode 100644 styles/proselint/Oxymorons.yml create mode 100644 styles/proselint/P-Value.yml create mode 100644 styles/proselint/RASSyndrome.yml create mode 100644 styles/proselint/README.md create mode 100644 styles/proselint/Skunked.yml create mode 100644 styles/proselint/Spelling.yml create mode 100644 styles/proselint/Typography.yml create mode 100644 styles/proselint/Uncomparables.yml create mode 100644 styles/proselint/Very.yml create mode 100644 styles/proselint/meta.json create mode 100644 styles/write-good/Cliches.yml create mode 100644 styles/write-good/E-Prime.yml create mode 100644 styles/write-good/Illusions.yml create mode 100644 styles/write-good/Passive.yml create mode 100644 styles/write-good/README.md create mode 100644 styles/write-good/So.yml create mode 100644 styles/write-good/ThereIs.yml create mode 100644 styles/write-good/TooWordy.yml create mode 100644 styles/write-good/Weasel.yml create mode 100644 styles/write-good/meta.json diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000..dac66ab9 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,13 @@ +StylesPath = styles + +Vocab=Docs + +MinAlertLevel = suggestion + +Packages = Google, proselint, write-good + +[*.md] +BasedOnStyles = Vale, Google, proselint, write-good + +[*.mdx] +BasedOnStyles = Vale, Google, proselint, write-good diff --git a/styles/Google/AMPM.yml b/styles/Google/AMPM.yml new file mode 100644 index 00000000..fbdc6e4f --- /dev/null +++ b/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: 'https://developers.google.com/style/word-list' +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/styles/Google/Acronyms.yml b/styles/Google/Acronyms.yml new file mode 100644 index 00000000..f41af018 --- /dev/null +++ b/styles/Google/Acronyms.yml @@ -0,0 +1,64 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/styles/Google/Colons.yml b/styles/Google/Colons.yml new file mode 100644 index 00000000..99363fbd --- /dev/null +++ b/styles/Google/Colons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should be in lowercase." +link: 'https://developers.google.com/style/colons' +nonword: true +level: warning +scope: sentence +tokens: + - ':\s[A-Z]' diff --git a/styles/Google/Contractions.yml b/styles/Google/Contractions.yml new file mode 100644 index 00000000..4f6fd5d4 --- /dev/null +++ b/styles/Google/Contractions.yml @@ -0,0 +1,30 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/contractions' +level: suggestion +ignorecase: true +action: + name: replace +swap: + are not: aren't + cannot: can't + could not: couldn't + did not: didn't + do not: don't + does not: doesn't + has not: hasn't + have not: haven't + how is: how's + is not: isn't + it is: it's + should not: shouldn't + that is: that's + they are: they're + was not: wasn't + we are: we're + we have: we've + were not: weren't + what is: what's + when is: when's + where is: where's + will not: won't diff --git a/styles/Google/DateFormat.yml b/styles/Google/DateFormat.yml new file mode 100644 index 00000000..e9d227fa --- /dev/null +++ b/styles/Google/DateFormat.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'July 31, 2016' format, not '%s'." +link: 'https://developers.google.com/style/dates-times' +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/styles/Google/Ellipses.yml b/styles/Google/Ellipses.yml new file mode 100644 index 00000000..1e070517 --- /dev/null +++ b/styles/Google/Ellipses.yml @@ -0,0 +1,9 @@ +extends: existence +message: "In general, don't use an ellipsis." +link: 'https://developers.google.com/style/ellipses' +nonword: true +level: warning +action: + name: remove +tokens: + - '\.\.\.' diff --git a/styles/Google/EmDash.yml b/styles/Google/EmDash.yml new file mode 100644 index 00000000..1befe72a --- /dev/null +++ b/styles/Google/EmDash.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: 'https://developers.google.com/style/dashes' +nonword: true +level: error +action: + name: edit + params: + - remove + - ' ' +tokens: + - '\s[—–]\s' diff --git a/styles/Google/EnDash.yml b/styles/Google/EnDash.yml new file mode 100644 index 00000000..b314dc4e --- /dev/null +++ b/styles/Google/EnDash.yml @@ -0,0 +1,13 @@ +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/styles/Google/Exclamation.yml b/styles/Google/Exclamation.yml new file mode 100644 index 00000000..eea5fd24 --- /dev/null +++ b/styles/Google/Exclamation.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use exclamation points in text." +link: 'https://developers.google.com/style/exclamation-points' +nonword: true +level: error +action: + name: remove +tokens: + - '\w+!(?:\s|$)' diff --git a/styles/Google/FirstPerson.yml b/styles/Google/FirstPerson.yml new file mode 100644 index 00000000..0b7b8828 --- /dev/null +++ b/styles/Google/FirstPerson.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/styles/Google/Gender.yml b/styles/Google/Gender.yml new file mode 100644 index 00000000..c8486181 --- /dev/null +++ b/styles/Google/Gender.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use '%s' as a gender-neutral pronoun." +link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' +level: error +ignorecase: true +tokens: + - he/she + - s/he + - \(s\)he diff --git a/styles/Google/GenderBias.yml b/styles/Google/GenderBias.yml new file mode 100644 index 00000000..9e701908 --- /dev/null +++ b/styles/Google/GenderBias.yml @@ -0,0 +1,47 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: 'https://developers.google.com/style/inclusive-documentation' +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) + 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) diff --git a/styles/Google/HeadingPunctuation.yml b/styles/Google/HeadingPunctuation.yml new file mode 100644 index 00000000..b538be5b --- /dev/null +++ b/styles/Google/HeadingPunctuation.yml @@ -0,0 +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' +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - '.' +tokens: + - '[a-z0-9][.]\s*$' diff --git a/styles/Google/Headings.yml b/styles/Google/Headings.yml new file mode 100644 index 00000000..a5330133 --- /dev/null +++ b/styles/Google/Headings.yml @@ -0,0 +1,29 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +level: warning +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - Azure + - CLI + - Code + - Cosmos + - Docker + - Emmet + - gRPC + - I + - Kubernetes + - Linux + - macOS + - Marketplace + - MongoDB + - REPL + - Studio + - TypeScript + - URLs + - Visual + - VS + - Windows diff --git a/styles/Google/Latin.yml b/styles/Google/Latin.yml new file mode 100644 index 00000000..ca03b915 --- /dev/null +++ b/styles/Google/Latin.yml @@ -0,0 +1,11 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)(?=[\s,;])': for example + '\b(?:ie|i\.e\.)(?=[\s,;])': that is diff --git a/styles/Google/LyHyphens.yml b/styles/Google/LyHyphens.yml new file mode 100644 index 00000000..ac8f557a --- /dev/null +++ b/styles/Google/LyHyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: 'https://developers.google.com/style/hyphens' +level: error +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - '-' + - ' ' +tokens: + - '\s[^\s-]+ly-' diff --git a/styles/Google/OptionalPlurals.yml b/styles/Google/OptionalPlurals.yml new file mode 100644 index 00000000..f858ea6f --- /dev/null +++ b/styles/Google/OptionalPlurals.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use plurals in parentheses such as in '%s'." +link: 'https://developers.google.com/style/plurals-parentheses' +level: error +nonword: true +action: + name: edit + params: + - remove + - '(s)' +tokens: + - '\b\w+\(s\)' diff --git a/styles/Google/Ordinal.yml b/styles/Google/Ordinal.yml new file mode 100644 index 00000000..d1ac7d27 --- /dev/null +++ b/styles/Google/Ordinal.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: 'https://developers.google.com/style/numbers' +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/styles/Google/OxfordComma.yml b/styles/Google/OxfordComma.yml new file mode 100644 index 00000000..b9ba21eb --- /dev/null +++ b/styles/Google/OxfordComma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: 'https://developers.google.com/style/commas' +scope: sentence +level: warning +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/styles/Google/Parens.yml b/styles/Google/Parens.yml new file mode 100644 index 00000000..3b8711d0 --- /dev/null +++ b/styles/Google/Parens.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use parentheses judiciously." +link: 'https://developers.google.com/style/parentheses' +nonword: true +level: suggestion +tokens: + - '\(.+\)' diff --git a/styles/Google/Passive.yml b/styles/Google/Passive.yml new file mode 100644 index 00000000..3265890e --- /dev/null +++ b/styles/Google/Passive.yml @@ -0,0 +1,184 @@ +extends: existence +link: 'https://developers.google.com/style/voice' +message: "In general, use active voice instead of passive voice ('%s')." +ignorecase: true +level: suggestion +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/styles/Google/Periods.yml b/styles/Google/Periods.yml new file mode 100644 index 00000000..d24a6a6c --- /dev/null +++ b/styles/Google/Periods.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +level: error +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/styles/Google/Quotes.yml b/styles/Google/Quotes.yml new file mode 100644 index 00000000..3cb6f1ab --- /dev/null +++ b/styles/Google/Quotes.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Commas and periods go inside quotation marks." +link: 'https://developers.google.com/style/quotation-marks' +level: error +nonword: true +tokens: + - '"[^"]+"[.,?]' diff --git a/styles/Google/Ranges.yml b/styles/Google/Ranges.yml new file mode 100644 index 00000000..3ec045e7 --- /dev/null +++ b/styles/Google/Ranges.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add words such as 'from' or 'between' to describe a range of numbers." +link: 'https://developers.google.com/style/hyphens' +nonword: true +level: warning +tokens: + - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/styles/Google/Semicolons.yml b/styles/Google/Semicolons.yml new file mode 100644 index 00000000..bb8b85b4 --- /dev/null +++ b/styles/Google/Semicolons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use semicolons judiciously." +link: 'https://developers.google.com/style/semicolons' +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/styles/Google/Slang.yml b/styles/Google/Slang.yml new file mode 100644 index 00000000..63f4c248 --- /dev/null +++ b/styles/Google/Slang.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Don't use internet slang abbreviations such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +tokens: + - 'tl;dr' + - ymmv + - rtfm + - imo + - fwiw diff --git a/styles/Google/Spacing.yml b/styles/Google/Spacing.yml new file mode 100644 index 00000000..66e45a6b --- /dev/null +++ b/styles/Google/Spacing.yml @@ -0,0 +1,10 @@ +extends: existence +message: "'%s' should have one space." +link: 'https://developers.google.com/style/sentence-spacing' +level: error +nonword: true +action: + name: remove +tokens: + - '[a-z][.?!] {2,}[A-Z]' + - '[a-z][.?!][A-Z]' diff --git a/styles/Google/Spelling.yml b/styles/Google/Spelling.yml new file mode 100644 index 00000000..527ac07d --- /dev/null +++ b/styles/Google/Spelling.yml @@ -0,0 +1,10 @@ +extends: existence +message: "In general, use American spelling instead of '%s'." +link: 'https://developers.google.com/style/spelling' +ignorecase: true +level: warning +tokens: + - '(?:\w+)nised?' + - 'colour' + - 'labour' + - 'centre' diff --git a/styles/Google/Units.yml b/styles/Google/Units.yml new file mode 100644 index 00000000..53522ab2 --- /dev/null +++ b/styles/Google/Units.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Put a nonbreaking space between the number and the unit in '%s'." +link: "https://developers.google.com/style/units-of-measure" +nonword: true +level: error +tokens: + - \b\d+(?:B|kB|MB|GB|TB) + - \b\d+(?:ns|ms|s|min|h|d) diff --git a/styles/Google/We.yml b/styles/Google/We.yml new file mode 100644 index 00000000..c7ac7d36 --- /dev/null +++ b/styles/Google/We.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Try to avoid using first-person plural like '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +level: warning +ignorecase: true +tokens: + - we + - we'(?:ve|re) + - ours? + - us + - let's diff --git a/styles/Google/Will.yml b/styles/Google/Will.yml new file mode 100644 index 00000000..128a9183 --- /dev/null +++ b/styles/Google/Will.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Avoid using '%s'." +link: 'https://developers.google.com/style/tense' +ignorecase: true +level: warning +tokens: + - will diff --git a/styles/Google/WordList.yml b/styles/Google/WordList.yml new file mode 100644 index 00000000..0d675f23 --- /dev/null +++ b/styles/Google/WordList.yml @@ -0,0 +1,81 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: "https://developers.google.com/style/word-list" +level: warning +ignorecase: false +action: + name: replace +swap: + "(?:API Console|dev|developer) key": API key + "(?:cell ?phone|smart ?phone)": phone|mobile phone + "(?:dev|developer|APIs) console": API console + "(?:e-mail|Email|E-mail)": email + "(?:file ?path|path ?name)": path + "(?:kill|terminate|abort)": stop|exit|cancel|end + "(?:OAuth ?2|Oauth)": OAuth 2.0 + "(?:ok|Okay)": OK|okay + "(?:WiFi|wifi)": Wi-Fi + '[\.]+apk': APK + '3\-D': 3D + 'Google (?:I\-O|IO)': Google I/O + "tap (?:&|and) hold": touch & hold + "un(?:check|select)": clear + above: preceding + account name: username + action bar: app bar + admin: administrator + Ajax: AJAX + a\.k\.a|aka: or|also known as + Android device: Android-powered device + android: Android + API explorer: APIs Explorer + application: app + approx\.: approximately + authN: authentication + authZ: authorization + autoupdate: automatically update + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + check: select + CLI: command-line tool + click on: click|click in + Cloud: Google Cloud Platform|GCP + Container Engine: Kubernetes Engine + content type: media type + curated roles: predefined roles + data are: data is + Developers Console: Google API Console|API Console + disabled?: turn off|off + ephemeral IP address: ephemeral external IP address + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Google account: Google Account + Google accounts: Google Accounts + Googling: search with Google + grayed-out: unavailable + HTTPs: HTTPS + in order to: to + ingest: import|load + k8s: Kubernetes + long press: touch & hold + network IP address: internal IP address + omnibox: address bar + open-source: open source + overview screen: recents screen + regex: regular expression + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + static IP address: static external IP address + stylesheet: style sheet + synch: sync + tablename: table name + tablet: device + touch: tap + url: URL + vs\.: versus + World Wide Web: web diff --git a/styles/Google/meta.json b/styles/Google/meta.json new file mode 100644 index 00000000..a5da2a84 --- /dev/null +++ b/styles/Google/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Google/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/styles/Google/vocab.txt b/styles/Google/vocab.txt new file mode 100644 index 00000000..e69de29b diff --git a/styles/Vocab/Docs/accept.txt b/styles/Vocab/Docs/accept.txt new file mode 100644 index 00000000..887e6f1d --- /dev/null +++ b/styles/Vocab/Docs/accept.txt @@ -0,0 +1,3 @@ +Restate +AWS +Awakeables diff --git a/styles/Vocab/Docs/reject.txt b/styles/Vocab/Docs/reject.txt new file mode 100644 index 00000000..add535b8 --- /dev/null +++ b/styles/Vocab/Docs/reject.txt @@ -0,0 +1 @@ +(?i)background invoke diff --git a/styles/proselint/Airlinese.yml b/styles/proselint/Airlinese.yml new file mode 100644 index 00000000..a6ae9c19 --- /dev/null +++ b/styles/proselint/Airlinese.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' is airlinese." +ignorecase: true +level: error +tokens: + - enplan(?:e|ed|ing|ement) + - deplan(?:e|ed|ing|ement) + - taking off momentarily diff --git a/styles/proselint/AnimalLabels.yml b/styles/proselint/AnimalLabels.yml new file mode 100644 index 00000000..b92e06fc --- /dev/null +++ b/styles/proselint/AnimalLabels.yml @@ -0,0 +1,48 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +level: error +action: + name: replace +swap: + (?:bull|ox)-like: taurine + (?:calf|veal)-like: vituline + (?:crow|raven)-like: corvine + (?:leopard|panther)-like: pardine + bird-like: avine + centipede-like: scolopendrine + crab-like: cancrine + crocodile-like: crocodiline + deer-like: damine + eagle-like: aquiline + earthworm-like: lumbricine + falcon-like: falconine + ferine: wild animal-like + fish-like: piscine + fox-like: vulpine + frog-like: ranine + goat-like: hircine + goose-like: anserine + gull-like: laridine + hare-like: leporine + hawk-like: accipitrine + hippopotamus-like: hippopotamine + lizard-like: lacertine + mongoose-like: viverrine + mouse-like: murine + ostrich-like: struthionine + peacock-like: pavonine + porcupine-like: hystricine + rattlesnake-like: crotaline + sable-like: zibeline + sheep-like: ovine + shrew-like: soricine + sparrow-like: passerine + swallow-like: hirundine + swine-like: suilline + tiger-like: tigrine + viper-like: viperine + vulture-like: vulturine + wasp-like: vespine + wolf-like: lupine + woodpecker-like: picine + zebra-like: zebrine diff --git a/styles/proselint/Annotations.yml b/styles/proselint/Annotations.yml new file mode 100644 index 00000000..dcb24f41 --- /dev/null +++ b/styles/proselint/Annotations.yml @@ -0,0 +1,9 @@ +extends: existence +message: "'%s' left in text." +ignorecase: false +level: error +tokens: + - XXX + - FIXME + - TODO + - NOTE diff --git a/styles/proselint/Apologizing.yml b/styles/proselint/Apologizing.yml new file mode 100644 index 00000000..11088aaa --- /dev/null +++ b/styles/proselint/Apologizing.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Excessive apologizing: '%s'" +ignorecase: true +level: error +action: + name: remove +tokens: + - More research is needed diff --git a/styles/proselint/Archaisms.yml b/styles/proselint/Archaisms.yml new file mode 100644 index 00000000..c8df9abc --- /dev/null +++ b/styles/proselint/Archaisms.yml @@ -0,0 +1,52 @@ +extends: existence +message: "'%s' is archaic." +ignorecase: true +level: error +tokens: + - alack + - anent + - begat + - belike + - betimes + - boughten + - brocage + - brokage + - camarade + - chiefer + - chiefest + - Christiana + - completely obsolescent + - cozen + - divers + - deflexion + - fain + - forsooth + - foreclose from + - haply + - howbeit + - illumine + - in sooth + - maugre + - meseems + - methinks + - nigh + - peradventure + - perchance + - saith + - shew + - sistren + - spake + - to wit + - verily + - whilom + - withal + - wot + - enclosed please find + - please find enclosed + - enclosed herewith + - enclosed herein + - inforce + - ex postfacto + - foreclose from + - forewent + - for ever diff --git a/styles/proselint/But.yml b/styles/proselint/But.yml new file mode 100644 index 00000000..0e2c32b9 --- /dev/null +++ b/styles/proselint/But.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Do not start a paragraph with a 'but'." +level: error +scope: paragraph +action: + name: remove +tokens: + - ^But diff --git a/styles/proselint/Cliches.yml b/styles/proselint/Cliches.yml new file mode 100644 index 00000000..c56183c5 --- /dev/null +++ b/styles/proselint/Cliches.yml @@ -0,0 +1,782 @@ +extends: existence +message: "'%s' is a cliche." +level: error +ignorecase: true +tokens: + - a chip off the old block + - a clean slate + - a dark and stormy night + - a far cry + - a fate worse than death + - a fine kettle of fish + - a loose cannon + - a penny saved is a penny earned + - a tough row to hoe + - a word to the wise + - ace in the hole + - acid test + - add insult to injury + - against all odds + - air your dirty laundry + - alas and alack + - all fun and games + - all hell broke loose + - all in a day's work + - all talk, no action + - all thumbs + - all your eggs in one basket + - all's fair in love and war + - all's well that ends well + - almighty dollar + - American as apple pie + - an axe to grind + - another day, another dollar + - armed to the teeth + - as luck would have it + - as old as time + - as the crow flies + - at loose ends + - at my wits end + - at the end of the day + - avoid like the plague + - babe in the woods + - back against the wall + - back in the saddle + - back to square one + - back to the drawing board + - bad to the bone + - badge of honor + - bald faced liar + - bald-faced lie + - ballpark figure + - banging your head against a brick wall + - baptism by fire + - barking up the wrong tree + - bat out of hell + - be all and end all + - beat a dead horse + - beat around the bush + - been there, done that + - beggars can't be choosers + - behind the eight ball + - bend over backwards + - benefit of the doubt + - bent out of shape + - best thing since sliced bread + - bet your bottom dollar + - better half + - better late than never + - better mousetrap + - better safe than sorry + - between a rock and a hard place + - between a rock and a hard place + - between Scylla and Charybdis + - between the devil and the deep blue see + - betwixt and between + - beyond the pale + - bide your time + - big as life + - big cheese + - big fish in a small pond + - big man on campus + - bigger they are the harder they fall + - bird in the hand + - bird's eye view + - birds and the bees + - birds of a feather flock together + - bit the hand that feeds you + - bite the bullet + - bite the dust + - bitten off more than he can chew + - black as coal + - black as pitch + - black as the ace of spades + - blast from the past + - bleeding heart + - blessing in disguise + - blind ambition + - blind as a bat + - blind leading the blind + - blissful ignorance + - blood is thicker than water + - blood sweat and tears + - blow a fuse + - blow off steam + - blow your own horn + - blushing bride + - boils down to + - bolt from the blue + - bone to pick + - bored stiff + - bored to tears + - bottomless pit + - boys will be boys + - bright and early + - brings home the bacon + - broad across the beam + - broken record + - brought back to reality + - bulk large + - bull by the horns + - bull in a china shop + - burn the midnight oil + - burning question + - burning the candle at both ends + - burst your bubble + - bury the hatchet + - busy as a bee + - but that's another story + - by hook or by crook + - call a spade a spade + - called onto the carpet + - calm before the storm + - can of worms + - can't cut the mustard + - can't hold a candle to + - case of mistaken identity + - cast aspersions + - cat got your tongue + - cat's meow + - caught in the crossfire + - caught red-handed + - chase a red herring + - checkered past + - chomping at the bit + - cleanliness is next to godliness + - clear as a bell + - clear as mud + - close to the vest + - cock and bull story + - cold shoulder + - come hell or high water + - comparing apples and oranges + - compleat + - conspicuous by its absence + - cool as a cucumber + - cool, calm, and collected + - cost a king's ransom + - count your blessings + - crack of dawn + - crash course + - creature comforts + - cross that bridge when you come to it + - crushing blow + - cry like a baby + - cry me a river + - cry over spilt milk + - crystal clear + - crystal clear + - curiosity killed the cat + - cut and dried + - cut through the red tape + - cut to the chase + - cute as a bugs ear + - cute as a button + - cute as a puppy + - cuts to the quick + - cutting edge + - dark before the dawn + - day in, day out + - dead as a doornail + - decision-making process + - devil is in the details + - dime a dozen + - divide and conquer + - dog and pony show + - dog days + - dog eat dog + - dog tired + - don't burn your bridges + - don't count your chickens + - don't look a gift horse in the mouth + - don't rock the boat + - don't step on anyone's toes + - don't take any wooden nickels + - down and out + - down at the heels + - down in the dumps + - down the hatch + - down to earth + - draw the line + - dressed to kill + - dressed to the nines + - drives me up the wall + - dubious distinction + - dull as dishwater + - duly authorized + - dyed in the wool + - eagle eye + - ear to the ground + - early bird catches the worm + - easier said than done + - easy as pie + - eat your heart out + - eat your words + - eleventh hour + - even the playing field + - every dog has its day + - every fiber of my being + - everything but the kitchen sink + - eye for an eye + - eyes peeled + - face the music + - facts of life + - fair weather friend + - fall by the wayside + - fan the flames + - far be it from me + - fast and loose + - feast or famine + - feather your nest + - feathered friends + - few and far between + - fifteen minutes of fame + - fills the bill + - filthy vermin + - fine kettle of fish + - first and foremost + - fish out of water + - fishing for a compliment + - fit as a fiddle + - fit the bill + - fit to be tied + - flash in the pan + - flat as a pancake + - flip your lid + - flog a dead horse + - fly by night + - fly the coop + - follow your heart + - for all intents and purposes + - for free + - for the birds + - for what it's worth + - force of nature + - force to be reckoned with + - forgive and forget + - fox in the henhouse + - free and easy + - free as a bird + - fresh as a daisy + - full steam ahead + - fun in the sun + - garbage in, garbage out + - gentle as a lamb + - get a kick out of + - get a leg up + - get down and dirty + - get the lead out + - get to the bottom of + - get with the program + - get your feet wet + - gets my goat + - gilding the lily + - gilding the lily + - give and take + - go against the grain + - go at it tooth and nail + - go for broke + - go him one better + - go the extra mile + - go with the flow + - goes without saying + - good as gold + - good deed for the day + - good things come to those who wait + - good time was had by all + - good times were had by all + - greased lightning + - greek to me + - green thumb + - green-eyed monster + - grist for the mill + - growing like a weed + - hair of the dog + - hand to mouth + - happy as a clam + - happy as a lark + - hasn't a clue + - have a nice day + - have a short fuse + - have high hopes + - have the last laugh + - haven't got a row to hoe + - he's got his hands full + - head honcho + - head over heels + - hear a pin drop + - heard it through the grapevine + - heart's content + - heavy as lead + - hem and haw + - high and dry + - high and mighty + - high as a kite + - his own worst enemy + - his work cut out for him + - hit paydirt + - hither and yon + - Hobson's choice + - hold your head up high + - hold your horses + - hold your own + - hold your tongue + - honest as the day is long + - horns of a dilemma + - horns of a dilemma + - horse of a different color + - hot under the collar + - hour of need + - I beg to differ + - icing on the cake + - if the shoe fits + - if the shoe were on the other foot + - if you catch my drift + - in a jam + - in a jiffy + - in a nutshell + - in a pig's eye + - in a pinch + - in a word + - in hot water + - in light of + - in the final analysis + - in the gutter + - in the last analysis + - in the nick of time + - in the thick of it + - in your dreams + - innocent bystander + - it ain't over till the fat lady sings + - it goes without saying + - it takes all kinds + - it takes one to know one + - it's a small world + - it's not what you know, it's who you know + - it's only a matter of time + - ivory tower + - Jack of all trades + - jockey for position + - jog your memory + - joined at the hip + - judge a book by its cover + - jump down your throat + - jump in with both feet + - jump on the bandwagon + - jump the gun + - jump to conclusions + - just a hop, skip, and a jump + - just the ticket + - justice is blind + - keep a stiff upper lip + - keep an eye on + - keep it simple, stupid + - keep the home fires burning + - keep up with the Joneses + - keep your chin up + - keep your fingers crossed + - kick the bucket + - kick up your heels + - kick your feet up + - kid in a candy store + - kill two birds with one stone + - kiss of death + - knock it out of the park + - knock on wood + - knock your socks off + - know him from Adam + - know the ropes + - know the score + - knuckle down + - knuckle sandwich + - knuckle under + - labor of love + - ladder of success + - land on your feet + - lap of luxury + - last but not least + - last but not least + - last hurrah + - last-ditch effort + - law of the jungle + - law of the land + - lay down the law + - leaps and bounds + - let sleeping dogs lie + - let the cat out of the bag + - let the good times roll + - let your hair down + - let's talk turkey + - letter perfect + - lick your wounds + - lies like a rug + - life's a bitch + - life's a grind + - light at the end of the tunnel + - lighter than a feather + - lighter than air + - like clockwork + - like father like son + - like taking candy from a baby + - like there's no tomorrow + - lion's share + - live and learn + - live and let live + - long and short of it + - long lost love + - look before you leap + - look down your nose + - look what the cat dragged in + - looking a gift horse in the mouth + - looks like death warmed over + - loose cannon + - lose your head + - lose your temper + - loud as a horn + - lounge lizard + - loved and lost + - low man on the totem pole + - luck of the draw + - luck of the Irish + - make a mockery of + - make hay while the sun shines + - make money hand over fist + - make my day + - make the best of a bad situation + - make the best of it + - make your blood boil + - male chauvinism + - man of few words + - man's best friend + - mark my words + - meaningful dialogue + - missed the boat on that one + - moment in the sun + - moment of glory + - moment of truth + - moment of truth + - money to burn + - more in sorrow than in anger + - more power to you + - more sinned against than sinning + - more than one way to skin a cat + - movers and shakers + - moving experience + - my better half + - naked as a jaybird + - naked truth + - neat as a pin + - needle in a haystack + - needless to say + - neither here nor there + - never look back + - never say never + - nip and tuck + - nip in the bud + - nip it in the bud + - no guts, no glory + - no love lost + - no pain, no gain + - no skin off my back + - no stone unturned + - no time like the present + - no use crying over spilled milk + - nose to the grindstone + - not a hope in hell + - not a minute's peace + - not in my backyard + - not playing with a full deck + - not the end of the world + - not written in stone + - nothing to sneeze at + - nothing ventured nothing gained + - now we're cooking + - off the top of my head + - off the wagon + - off the wall + - old hat + - olden days + - older and wiser + - older than dirt + - older than Methuselah + - on a roll + - on cloud nine + - on pins and needles + - on the bandwagon + - on the money + - on the nose + - on the rocks + - on the same page + - on the spot + - on the tip of my tongue + - on the wagon + - on thin ice + - once bitten, twice shy + - one bad apple doesn't spoil the bushel + - one born every minute + - one brick short + - one foot in the grave + - one in a million + - one red cent + - only game in town + - open a can of worms + - open and shut case + - open the flood gates + - opportunity doesn't knock twice + - out of pocket + - out of sight, out of mind + - out of the frying pan into the fire + - out of the woods + - out on a limb + - over a barrel + - over the hump + - pain and suffering + - pain in the + - panic button + - par for the course + - part and parcel + - party pooper + - pass the buck + - patience is a virtue + - pay through the nose + - penny pincher + - perfect storm + - pig in a poke + - pile it on + - pillar of the community + - pin your hopes on + - pitter patter of little feet + - plain as day + - plain as the nose on your face + - play by the rules + - play your cards right + - playing the field + - playing with fire + - pleased as punch + - plenty of fish in the sea + - point with pride + - poor as a church mouse + - pot calling the kettle black + - presidential timber + - pretty as a picture + - pull a fast one + - pull your punches + - pulled no punches + - pulling your leg + - pure as the driven snow + - put it in a nutshell + - put one over on you + - put the cart before the horse + - put the pedal to the metal + - put your best foot forward + - put your foot down + - quantum jump + - quantum leap + - quick as a bunny + - quick as a lick + - quick as a wink + - quick as lightning + - quiet as a dormouse + - rags to riches + - raining buckets + - raining cats and dogs + - rank and file + - rat race + - reap what you sow + - red as a beet + - red herring + - redound to one's credit + - redound to the benefit of + - reinvent the wheel + - rich and famous + - rings a bell + - ripe old age + - ripped me off + - rise and shine + - road to hell is paved with good intentions + - rob Peter to pay Paul + - roll over in the grave + - rub the wrong way + - ruled the roost + - running in circles + - sad but true + - sadder but wiser + - salt of the earth + - scared stiff + - scared to death + - sea change + - sealed with a kiss + - second to none + - see eye to eye + - seen the light + - seize the day + - set the record straight + - set the world on fire + - set your teeth on edge + - sharp as a tack + - shirked his duties + - shoot for the moon + - shoot the breeze + - shot in the dark + - shoulder to the wheel + - sick as a dog + - sigh of relief + - signed, sealed, and delivered + - sink or swim + - six of one, half a dozen of another + - six of one, half a dozen of the other + - skating on thin ice + - slept like a log + - slinging mud + - slippery as an eel + - slow as molasses + - smart as a whip + - smooth as a baby's bottom + - sneaking suspicion + - snug as a bug in a rug + - sow wild oats + - spare the rod, spoil the child + - speak of the devil + - spilled the beans + - spinning your wheels + - spitting image of + - spoke with relish + - spread like wildfire + - spring to life + - squeaky wheel gets the grease + - stands out like a sore thumb + - start from scratch + - stick in the mud + - still waters run deep + - stitch in time + - stop and smell the roses + - straight as an arrow + - straw that broke the camel's back + - stretched to the breaking point + - strong as an ox + - stubborn as a mule + - stuff that dreams are made of + - stuffed shirt + - sweating blood + - sweating bullets + - take a load off + - take one for the team + - take the bait + - take the bull by the horns + - take the plunge + - takes one to know one + - takes two to tango + - than you can shake a stick at + - the cream of the crop + - the cream rises to the top + - the more the merrier + - the real deal + - the real McCoy + - the red carpet treatment + - the same old story + - the straw that broke the camel's back + - there is no accounting for taste + - thick as a brick + - thick as thieves + - thick as thieves + - thin as a rail + - think outside of the box + - thinking outside the box + - third time's the charm + - this day and age + - this hurts me worse than it hurts you + - this point in time + - thought leaders? + - three sheets to the wind + - through thick and thin + - throw in the towel + - throw the baby out with the bathwater + - tie one on + - tighter than a drum + - time and time again + - time is of the essence + - tip of the iceberg + - tired but happy + - to coin a phrase + - to each his own + - to make a long story short + - to the best of my knowledge + - toe the line + - tongue in cheek + - too good to be true + - too hot to handle + - too numerous to mention + - touch with a ten foot pole + - tough as nails + - trial and error + - trials and tribulations + - tried and true + - trip down memory lane + - twist of fate + - two cents worth + - two peas in a pod + - ugly as sin + - under the counter + - under the gun + - under the same roof + - under the weather + - until the cows come home + - unvarnished truth + - up the creek + - uphill battle + - upper crust + - upset the applecart + - vain attempt + - vain effort + - vanquish the enemy + - various and sundry + - vested interest + - viable alternative + - waiting for the other shoe to drop + - wakeup call + - warm welcome + - watch your p's and q's + - watch your tongue + - watching the clock + - water under the bridge + - wax eloquent + - wax poetic + - we've got a situation here + - weather the storm + - weed them out + - week of Sundays + - went belly up + - wet behind the ears + - what goes around comes around + - what you see is what you get + - when it rains, it pours + - when push comes to shove + - when the cat's away + - when the going gets tough, the tough get going + - whet (?:the|your) appetite + - white as a sheet + - whole ball of wax + - whole hog + - whole nine yards + - wild goose chase + - will wonders never cease? + - wisdom of the ages + - wise as an owl + - wolf at the door + - wool pulled over our eyes + - words fail me + - work like a dog + - world weary + - worst nightmare + - worth its weight in gold + - writ large + - wrong side of the bed + - yanking your chain + - yappy as a dog + - years young + - you are what you eat + - you can run but you can't hide + - you only live once + - you're the boss + - young and foolish + - young and vibrant diff --git a/styles/proselint/CorporateSpeak.yml b/styles/proselint/CorporateSpeak.yml new file mode 100644 index 00000000..4de8ee3f --- /dev/null +++ b/styles/proselint/CorporateSpeak.yml @@ -0,0 +1,30 @@ +extends: existence +message: "'%s' is corporate speak." +ignorecase: true +level: error +tokens: + - at the end of the day + - back to the drawing board + - hit the ground running + - get the ball rolling + - low-hanging fruit + - thrown under the bus + - think outside the box + - let's touch base + - get my manager's blessing + - it's on my radar + - ping me + - i don't have the bandwidth + - no brainer + - par for the course + - bang for your buck + - synergy + - move the goal post + - apples to apples + - win-win + - circle back around + - all hands on deck + - take this offline + - drill-down + - elephant in the room + - on my plate diff --git a/styles/proselint/Currency.yml b/styles/proselint/Currency.yml new file mode 100644 index 00000000..ebd4b7d3 --- /dev/null +++ b/styles/proselint/Currency.yml @@ -0,0 +1,5 @@ +extends: existence +message: "Incorrect use of symbols in '%s'." +ignorecase: true +raw: + - \$[\d]* ?(?:dollars|usd|us dollars) diff --git a/styles/proselint/Cursing.yml b/styles/proselint/Cursing.yml new file mode 100644 index 00000000..e65070a9 --- /dev/null +++ b/styles/proselint/Cursing.yml @@ -0,0 +1,15 @@ +extends: existence +message: "Consider replacing '%s'." +level: error +ignorecase: true +tokens: + - shit + - piss + - fuck + - cunt + - cocksucker + - motherfucker + - tits + - fart + - turd + - twat diff --git a/styles/proselint/DateCase.yml b/styles/proselint/DateCase.yml new file mode 100644 index 00000000..9aa1bd99 --- /dev/null +++ b/styles/proselint/DateCase.yml @@ -0,0 +1,7 @@ +extends: existence +message: With lowercase letters, the periods are standard. +ignorecase: false +level: error +nonword: true +tokens: + - '\d{1,2} ?[ap]m\b' diff --git a/styles/proselint/DateMidnight.yml b/styles/proselint/DateMidnight.yml new file mode 100644 index 00000000..0130e1ae --- /dev/null +++ b/styles/proselint/DateMidnight.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use 'midnight' or 'noon'." +ignorecase: true +level: error +nonword: true +tokens: + - '12 ?[ap]\.?m\.?' diff --git a/styles/proselint/DateRedundancy.yml b/styles/proselint/DateRedundancy.yml new file mode 100644 index 00000000..b1f653ea --- /dev/null +++ b/styles/proselint/DateRedundancy.yml @@ -0,0 +1,10 @@ +extends: existence +message: "'a.m.' is always morning; 'p.m.' is always night." +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2} ?a\.?m\.? in the morning' + - '\d{1,2} ?p\.?m\.? in the evening' + - '\d{1,2} ?p\.?m\.? at night' + - '\d{1,2} ?p\.?m\.? in the afternoon' diff --git a/styles/proselint/DateSpacing.yml b/styles/proselint/DateSpacing.yml new file mode 100644 index 00000000..b7a2fd33 --- /dev/null +++ b/styles/proselint/DateSpacing.yml @@ -0,0 +1,7 @@ +extends: existence +message: "It's standard to put a space before '%s'" +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}[ap]\.?m\.?' diff --git a/styles/proselint/DenizenLabels.yml b/styles/proselint/DenizenLabels.yml new file mode 100644 index 00000000..bc3dd8ab --- /dev/null +++ b/styles/proselint/DenizenLabels.yml @@ -0,0 +1,52 @@ +extends: substitution +message: Did you mean '%s'? +ignorecase: false +action: + name: replace +swap: + (?:Afrikaaner|Afrikander): Afrikaner + (?:Hong Kongite|Hong Kongian): Hong Konger + (?:Indianan|Indianian): Hoosier + (?:Michiganite|Michiganian): Michigander + (?:New Hampshireite|New Hampshireman): New Hampshirite + (?:Newcastlite|Newcastleite): Novocastrian + (?:Providencian|Providencer): Providentian + (?:Trentian|Trentonian): Tridentine + (?:Warsawer|Warsawian): Varsovian + (?:Wolverhamptonite|Wolverhamptonian): Wulfrunian + Alabaman: Alabamian + Albuquerquian: Albuquerquean + Anchoragite: Anchorageite + Arizonian: Arizonan + Arkansawyer: Arkansan + Belarusan: Belarusian + Cayman Islander: Caymanian + Coloradoan: Coloradan + Connecticuter: Nutmegger + Fairbanksian: Fairbanksan + Fort Worther: Fort Worthian + Grenadian: Grenadan + Halifaxer: Haligonian + Hartlepoolian: Hartlepudlian + Illinoisian: Illinoisan + Iowegian: Iowan + Leedsian: Leodenisian + Liverpoolian: Liverpudlian + Los Angelean: Angeleno + Manchesterian: Mancunian + Minneapolisian: Minneapolitan + Missouran: Missourian + Monacan: Monegasque + Neopolitan: Neapolitan + New Jerseyite: New Jerseyan + New Orleansian: New Orleanian + Oklahoma Citian: Oklahoma Cityan + Oklahomian: Oklahoman + Saudi Arabian: Saudi + Seattlite: Seattleite + Surinamer: Surinamese + Tallahassean: Tallahasseean + Tennesseean: Tennessean + Trois-Rivièrester: Trifluvian + Utahan: Utahn + Valladolidian: Vallisoletano diff --git a/styles/proselint/Diacritical.yml b/styles/proselint/Diacritical.yml new file mode 100644 index 00000000..2416cf28 --- /dev/null +++ b/styles/proselint/Diacritical.yml @@ -0,0 +1,95 @@ +extends: substitution +message: Consider using '%s' instead of '%s'. +ignorecase: true +level: error +action: + name: replace +swap: + beau ideal: beau idéal + boutonniere: boutonnière + bric-a-brac: bric-à-brac + cafe: café + cause celebre: cause célèbre + chevre: chèvre + cliche: cliché + consomme: consommé + coup de grace: coup de grâce + crudites: crudités + creme brulee: crème brûlée + creme de menthe: crème de menthe + creme fraice: crème fraîche + creme fresh: crème fraîche + crepe: crêpe + debutante: débutante + decor: décor + deja vu: déjà vu + denouement: dénouement + facade: façade + fiance: fiancé + fiancee: fiancée + flambe: flambé + garcon: garçon + lycee: lycée + maitre d: maître d + menage a trois: ménage à trois + negligee: négligée + protege: protégé + protegee: protégée + puree: purée + my resume: my résumé + your resume: your résumé + his resume: his résumé + her resume: her résumé + a resume: a résumé + the resume: the résumé + risque: risqué + roue: roué + soiree: soirée + souffle: soufflé + soupcon: soupçon + touche: touché + tete-a-tete: tête-à-tête + voila: voilà + a la carte: à la carte + a la mode: à la mode + emigre: émigré + + # Spanish loanwords + El Nino: El Niño + jalapeno: jalapeño + La Nina: La Niña + pina colada: piña colada + senor: señor + senora: señora + senorita: señorita + + # Portuguese loanwords + acai: açaí + + # German loanwords + doppelganger: doppelgänger + Fuhrer: Führer + Gewurztraminer: Gewürztraminer + vis-a-vis: vis-à-vis + Ubermensch: Übermensch + + # Swedish loanwords + filmjolk: filmjölk + smorgasbord: smörgåsbord + + # Names, places, and companies + Beyonce: Beyoncé + Bronte: Brontë + Champs-Elysees: Champs-Élysées + Citroen: Citroën + Curacao: Curaçao + Lowenbrau: Löwenbräu + Monegasque: Monégasque + Motley Crue: Mötley Crüe + Nescafe: Nescafé + Queensryche: Queensrÿche + Quebec: Québec + Quebecois: Québécois + Angstrom: Ångström + angstrom: ångström + Skoda: Škoda diff --git a/styles/proselint/GenderBias.yml b/styles/proselint/GenderBias.yml new file mode 100644 index 00000000..d98d3cf4 --- /dev/null +++ b/styles/proselint/GenderBias.yml @@ -0,0 +1,45 @@ +extends: substitution +message: Consider using '%s' instead of '%s'. +ignorecase: true +level: error +action: + name: replace +swap: + (?:alumnae|alumni): graduates + (?:alumna|alumnus): graduate + 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 + 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/styles/proselint/GroupTerms.yml b/styles/proselint/GroupTerms.yml new file mode 100644 index 00000000..7a59fa48 --- /dev/null +++ b/styles/proselint/GroupTerms.yml @@ -0,0 +1,39 @@ +extends: substitution +message: Consider using '%s' instead of '%s'. +ignorecase: true +action: + name: replace +swap: + (?:bunch|group|pack|flock) of chickens: brood of chickens + (?:bunch|group|pack|flock) of crows: murder of crows + (?:bunch|group|pack|flock) of hawks: cast of hawks + (?:bunch|group|pack|flock) of parrots: pandemonium of parrots + (?:bunch|group|pack|flock) of peacocks: muster of peacocks + (?:bunch|group|pack|flock) of penguins: muster of penguins + (?:bunch|group|pack|flock) of sparrows: host of sparrows + (?:bunch|group|pack|flock) of turkeys: rafter of turkeys + (?:bunch|group|pack|flock) of woodpeckers: descent of woodpeckers + (?:bunch|group|pack|herd) of apes: shrewdness of apes + (?:bunch|group|pack|herd) of baboons: troop of baboons + (?:bunch|group|pack|herd) of badgers: cete of badgers + (?:bunch|group|pack|herd) of bears: sloth of bears + (?:bunch|group|pack|herd) of bullfinches: bellowing of bullfinches + (?:bunch|group|pack|herd) of bullocks: drove of bullocks + (?:bunch|group|pack|herd) of caterpillars: army of caterpillars + (?:bunch|group|pack|herd) of cats: clowder of cats + (?:bunch|group|pack|herd) of colts: rag of colts + (?:bunch|group|pack|herd) of crocodiles: bask of crocodiles + (?:bunch|group|pack|herd) of dolphins: school of dolphins + (?:bunch|group|pack|herd) of foxes: skulk of foxes + (?:bunch|group|pack|herd) of gorillas: band of gorillas + (?:bunch|group|pack|herd) of hippopotami: bloat of hippopotami + (?:bunch|group|pack|herd) of horses: drove of horses + (?:bunch|group|pack|herd) of jellyfish: fluther of jellyfish + (?:bunch|group|pack|herd) of kangeroos: mob of kangeroos + (?:bunch|group|pack|herd) of monkeys: troop of monkeys + (?:bunch|group|pack|herd) of oxen: yoke of oxen + (?:bunch|group|pack|herd) of rhinoceros: crash of rhinoceros + (?:bunch|group|pack|herd) of wild boar: sounder of wild boar + (?:bunch|group|pack|herd) of wild pigs: drift of wild pigs + (?:bunch|group|pack|herd) of zebras: zeal of wild pigs + (?:bunch|group|pack|school) of trout: hover of trout diff --git a/styles/proselint/Hedging.yml b/styles/proselint/Hedging.yml new file mode 100644 index 00000000..a8615f8b --- /dev/null +++ b/styles/proselint/Hedging.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' is hedging." +ignorecase: true +level: error +tokens: + - I would argue that + - ', so to speak' + - to a certain degree diff --git a/styles/proselint/Hyperbole.yml b/styles/proselint/Hyperbole.yml new file mode 100644 index 00000000..0361772c --- /dev/null +++ b/styles/proselint/Hyperbole.yml @@ -0,0 +1,6 @@ +extends: existence +message: "'%s' is hyperbolic." +level: error +nonword: true +tokens: + - '[a-z]+[!?]{2,}' diff --git a/styles/proselint/Jargon.yml b/styles/proselint/Jargon.yml new file mode 100644 index 00000000..2454a9c3 --- /dev/null +++ b/styles/proselint/Jargon.yml @@ -0,0 +1,11 @@ +extends: existence +message: "'%s' is jargon." +ignorecase: true +level: error +tokens: + - in the affirmative + - in the negative + - agendize + - per your order + - per your request + - disincentivize diff --git a/styles/proselint/LGBTOffensive.yml b/styles/proselint/LGBTOffensive.yml new file mode 100644 index 00000000..eaf5a84a --- /dev/null +++ b/styles/proselint/LGBTOffensive.yml @@ -0,0 +1,13 @@ +extends: existence +message: "'%s' is offensive. Remove it or consider the context." +ignorecase: true +tokens: + - fag + - faggot + - dyke + - sodomite + - homosexual agenda + - gay agenda + - transvestite + - homosexual lifestyle + - gay lifestyle diff --git a/styles/proselint/LGBTTerms.yml b/styles/proselint/LGBTTerms.yml new file mode 100644 index 00000000..efdf2688 --- /dev/null +++ b/styles/proselint/LGBTTerms.yml @@ -0,0 +1,15 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +ignorecase: true +action: + name: replace +swap: + homosexual man: gay man + homosexual men: gay men + homosexual woman: lesbian + homosexual women: lesbians + homosexual people: gay people + homosexual couple: gay couple + sexual preference: sexual orientation + (?:admitted homosexual|avowed homosexual): openly gay + special rights: equal rights diff --git a/styles/proselint/Malapropisms.yml b/styles/proselint/Malapropisms.yml new file mode 100644 index 00000000..96997787 --- /dev/null +++ b/styles/proselint/Malapropisms.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' is a malapropism." +ignorecase: true +level: error +tokens: + - the infinitesimal universe + - a serial experience + - attack my voracity diff --git a/styles/proselint/Needless.yml b/styles/proselint/Needless.yml new file mode 100644 index 00000000..1f2732e1 --- /dev/null +++ b/styles/proselint/Needless.yml @@ -0,0 +1,358 @@ +extends: substitution +message: Prefer '%s' over '%s' +ignorecase: true +action: + name: replace +swap: + '(?:cell phone|cell-phone)': cellphone + '(?:cliquey|cliquy)': cliquish + '(?:pygmean|pygmaen)': pygmy + '(?:retributional|retributionary)': retributive + '(?:revokable|revokeable)': revocable + abolishment: abolition + accessary: accessory + accreditate: accredit + accruement: accrual + accusee: accused + acquaintanceship: acquaintance + acquitment: acquittal + administrate: administer + administrated: administered + administrating: administering + adulterate: adulterous + advisatory: advisory + advocator: advocate + aggrievance: grievance + allegator: alleger + allusory: allusive + amative: amorous + amortizement: amortization + amphiboly: amphibology + anecdotalist: anecdotist + anilinctus: anilingus + anticipative: anticipatory + antithetic: antithetical + applicative: applicable + applicatory: applicable + applier: applicator + approbative: approbatory + arbitrager: arbitrageur + arsenous: arsenious + ascendance: ascendancy + ascendence: ascendancy + ascendency: ascendancy + auctorial: authorial + averral: averment + barbwire: barbed wire + benefic: beneficent + benignant: benign + bestowment: bestowal + betrothment: betrothal + blamableness: blameworthiness + butt naked: buck naked + camarade: comrade + carta blanca: carte blanche + casualities: casualties + casuality: casualty + catch on fire: catch fire + catholicly: catholically + cease fire: ceasefire + channelize: channel + chaplainship: chaplaincy + chrysalid: chrysalis + chrysalids: chrysalises + cigaret: cigarette + coemployee: coworker + cognitional: cognitive + cohabitate: cohabit + cohabitor: cohabitant + collodium: collodion + collusory: collusive + commemoratory: commemorative + commonty: commonage + communicatory: communicative + compensative: compensatory + complacence: complacency + complicitous: complicit + computate: compute + conciliative: conciliatory + concomitancy: concomitance + condonance: condonation + confirmative: confirmatory + congruency: congruence + connotate: connote + consanguineal: consanguine + conspicuity: conspicuousness + conspiratorialist: conspirator + constitutionist: constitutionalist + contingence: contigency + contributary: contributory + contumacity: contumacy + conversible: convertible + conveyal: conveyance + copartner: partner + copartnership: partnership + corroboratory: corroborative + cotemporaneous: contemporaneous + cotemporary: contemporary + criminate: incriminate + culpatory: inculpatory + cumbrance: encumbrance + cumulate: accumulate + curatory: curative + daredeviltry: daredevilry + deceptious: deceptive + defamative: defamatory + defraudulent: fraudulent + degeneratory: degenerative + delimitate: delimit + delusory: delusive + denouncement: denunciation + depositee: depositary + depreciative: depreciatory + deprival: deprivation + derogative: derogatory + destroyable: destructible + detoxicate: detoxify + detractory: detractive + deviancy: deviance + deviationist: deviant + digamy: deuterogamy + digitalize: digitize + diminishment: diminution + diplomatist: diplomat + disassociate: dissociate + disciplinatory: disciplinary + discriminant: discriminating + disenthrone: dethrone + disintegratory: disintegrative + dismission: dismissal + disorientate: disorient + disorientated: disoriented + disquieten: disquiet + distraite: distrait + divergency: divergence + dividable: divisible + doctrinary: doctrinaire + documental: documentary + domesticize: domesticate + duplicatory: duplicative + duteous: dutiful + educationalist: educationist + educatory: educative + enigmatas: enigmas + enlargen: enlarge + enswathe: swathe + epical: epic + erotism: eroticism + ethician: ethicist + ex officiis: ex officio + exculpative: exculpatory + exigeant: exigent + exigence: exigency + exotism: exoticism + expedience: expediency + expediential: expedient + extensible: extendable + eying: eyeing + fiefdom: fief + flagrance: flagrancy + flatulency: flatulence + fraudful: fraudulent + funebrial: funereal + geographical: geographic + geometrical: geometric + gerry-rigged: jury-rigged + goatherder: goatherd + gustatorial: gustatory + habitude: habit + henceforward: henceforth + hesitance: hesitancy + heterogenous: heterogeneous + hierarchic: hierarchical + hindermost: hindmost + honorand: honoree + hypostasize: hypostatize + hysteric: hysterical + idolatrize: idolize + impanel: empanel + imperviable: impervious + importunacy: importunity + impotency: impotence + imprimatura: imprimatur + improprietous: improper + inalterable: unalterable + incitation: incitement + incommunicative: uncommunicative + inconsistence: inconsistency + incontrollable: uncontrollable + incurment: incurrence + indow: endow + indue: endue + inhibitive: inhibitory + innavigable: unnavigable + innovational: innovative + inquisitional: inquisitorial + insistment: insistence + insolvable: unsolvable + instillment: instillation + instinctual: instinctive + insuror: insurer + insurrectional: insurrectionary + interpretate: interpret + intervenience: intervention + ironical: ironic + jerry-rigged: jury-rigged + judgmatic: judgmental + labyrinthian: labyrinthine + laudative: laudatory + legitimatization: legitimation + legitimatize: legitimize + legitimization: legitimation + lengthways: lengthwise + life-sized: life-size + liquorice: licorice + lithesome: lithe + lollipop: lollypop + loth: loath + lubricous: lubricious + maihem: mayhem + medicinal marijuana: medical marijuana + meliorate: ameliorate + minimalize: minimize + mirk: murk + mirky: murky + misdoubt: doubt + monetarize: monetize + moveable: movable + narcism: narcissism + neglective: neglectful + negligency: negligence + neologizer: neologist + neurologic: neurological + nicknack: knickknack + nictate: nictitate + nonenforceable: unenforceable + normalcy: normality + numbedness: numbness + omittable: omissible + onomatopoetic: onomatopoeic + opinioned: opined + optimum advantage: optimal advantage + orientate: orient + outsized: outsize + oversized: oversize + overthrowal: overthrow + pacificist: pacifist + paederast: pederast + parachronism: anachronism + parti-color: parti-colored + participative: participatory + party-colored: parti-colored + pediatrist: pediatrician + penumbrous: penumbral + perjorative: pejorative + permissory: permissive + permutate: permute + personation: impersonation + pharmaceutic: pharmaceutical + pleuritis: pleurisy + policy holder: policyholder + policyowner: policyholder + politicalize: politicize + precedency: precedence + preceptoral: preceptorial + precipitance: precipitancy + precipitant: precipitate + preclusory: preclusive + precolumbian: pre-Columbian + prefectoral: prefectorial + preponderately: preponderantly + preserval: preservation + preventative: preventive + proconsulship: proconsulate + procreational: procreative + procurance: procurement + propelment: propulsion + propulsory: propulsive + prosecutive: prosecutory + protectory: protective + provocatory: provocative + pruriency: prurience + psychal: psychical + punitory: punitive + quantitate: quantify + questionary: questionnaire + quiescency: quiescence + rabbin: rabbi + reasonability: reasonableness + recidivistic: recidivous + recriminative: recriminatory + recruital: recruitment + recurrency: recurrence + recusance: recusancy + recusation: recusal + recusement: recusal + redemptory: redemptive + referrable: referable + referrible: referable + refutatory: refutative + remitment: remittance + remittal: remission + renouncement: renunciation + renunciable: renounceable + reparatory: reparative + repudiative: repudiatory + requitement: requital + rescindment: rescission + restoral: restoration + reticency: reticence + reviewal: review + revisal: revision + revisional: revisionary + revolute: revolt + saliency: salience + salutiferous: salutary + sensatory: sensory + sessionary: sessional + shareowner: shareholder + sicklily: sickly + signator: signatory + slanderize: slander + societary: societal + sodomist: sodomite + solicitate: solicit + speculatory: speculative + spiritous: spirituous + statutorial: statutory + submergeable: submersible + submittal: submission + subtile: subtle + succuba: succubus + sufficience: sufficiency + suppliant: supplicant + surmisal: surmise + suspendible: suspendable + synthetize: synthesize + systemize: systematize + tactual: tactile + tangental: tangential + tautologous: tautological + tee-shirt: T-shirt + thenceforward: thenceforth + transiency: transience + transposal: transposition + unfrequent: infrequent + unreasonability: unreasonableness + unrevokable: irrevocable + unsubstantial: insubstantial + usurpature: usurpation + variative: variational + vegetive: vegetative + vindicative: vindictive + vituperous: vituperative + vociferant: vociferous + volitive: volitional + wolverene: wolverine + wolvish: wolfish + Zoroastrism: Zoroastrianism diff --git a/styles/proselint/Nonwords.yml b/styles/proselint/Nonwords.yml new file mode 100644 index 00000000..57e7b9e4 --- /dev/null +++ b/styles/proselint/Nonwords.yml @@ -0,0 +1,38 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +ignorecase: true +level: error +action: + name: replace +swap: + affrontery: effrontery + analyzation: analysis + annoyment: annoyance + confirmant: confirmand + confirmants: confirmands + conversate: converse + crained: cranded + discomforture: discomfort|discomfiture + dispersement: disbursement|dispersal + doubtlessly: doubtless|undoubtedly + forebearance: forbearance + improprietous: improper + inclimate: inclement + inimicable: inimical + irregardless: regardless + minimalize: minimize + minimalized: minimized + minimalizes: minimizes + minimalizing: minimizing + optimalize: optimize + paralyzation: paralysis + pettifogger: pettifog + proprietous: proper + relative inexpense: relatively low price|affordability + seldomly: seldom + thusly: thus + uncategorically: categorically + undoubtably: undoubtedly|indubitably + unequivocable: unequivocal + unmercilessly: mercilessly + unrelentlessly: unrelentingly|relentlessly diff --git a/styles/proselint/Oxymorons.yml b/styles/proselint/Oxymorons.yml new file mode 100644 index 00000000..25fd2aa5 --- /dev/null +++ b/styles/proselint/Oxymorons.yml @@ -0,0 +1,22 @@ +extends: existence +message: "'%s' is an oxymoron." +ignorecase: true +level: error +tokens: + - amateur expert + - increasingly less + - advancing backwards + - alludes explicitly to + - explicitly alludes to + - totally obsolescent + - completely obsolescent + - generally always + - usually always + - increasingly less + - build down + - conspicuous absence + - exact estimate + - found missing + - intense apathy + - mandatory choice + - organized mess diff --git a/styles/proselint/P-Value.yml b/styles/proselint/P-Value.yml new file mode 100644 index 00000000..82309386 --- /dev/null +++ b/styles/proselint/P-Value.yml @@ -0,0 +1,6 @@ +extends: existence +message: "You should use more decimal places, unless '%s' is really true." +ignorecase: true +level: suggestion +tokens: + - 'p = 0\.0{2,4}' diff --git a/styles/proselint/RASSyndrome.yml b/styles/proselint/RASSyndrome.yml new file mode 100644 index 00000000..deae9c7d --- /dev/null +++ b/styles/proselint/RASSyndrome.yml @@ -0,0 +1,30 @@ +extends: existence +message: "'%s' is redundant." +level: error +action: + name: edit + params: + - split + - ' ' + - '0' +tokens: + - ABM missile + - ACT test + - ABM missiles + - ABS braking system + - ATM machine + - CD disc + - CPI Index + - GPS system + - GUI interface + - HIV virus + - ISBN number + - LCD display + - PDF format + - PIN number + - RAS syndrome + - RIP in peace + - please RSVP + - SALT talks + - SAT test + - UPC codes diff --git a/styles/proselint/README.md b/styles/proselint/README.md new file mode 100644 index 00000000..40207686 --- /dev/null +++ b/styles/proselint/README.md @@ -0,0 +1,12 @@ +Copyright © 2014–2015, Jordan Suchow, Michael Pacer, and Lara A. Ross +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/styles/proselint/Skunked.yml b/styles/proselint/Skunked.yml new file mode 100644 index 00000000..96a1f690 --- /dev/null +++ b/styles/proselint/Skunked.yml @@ -0,0 +1,13 @@ +extends: existence +message: "'%s' is a bit of a skunked term — impossible to use without issue." +ignorecase: true +level: error +tokens: + - bona fides + - deceptively + - decimate + - effete + - fulsome + - hopefully + - impassionate + - Thankfully diff --git a/styles/proselint/Spelling.yml b/styles/proselint/Spelling.yml new file mode 100644 index 00000000..d3c9be7b --- /dev/null +++ b/styles/proselint/Spelling.yml @@ -0,0 +1,17 @@ +extends: consistency +message: "Inconsistent spelling of '%s'." +level: error +ignorecase: true +either: + advisor: adviser + centre: center + colour: color + emphasise: emphasize + finalise: finalize + focussed: focused + labour: labor + learnt: learned + organise: organize + organised: organized + organising: organizing + recognise: recognize diff --git a/styles/proselint/Typography.yml b/styles/proselint/Typography.yml new file mode 100644 index 00000000..60283ebf --- /dev/null +++ b/styles/proselint/Typography.yml @@ -0,0 +1,11 @@ +extends: substitution +message: Consider using the '%s' symbol instead of '%s'. +level: error +nonword: true +swap: + '\.\.\.': … + '\([cC]\)': © + '\(TM\)': ™ + '\(tm\)': ™ + '\([rR]\)': ® + '[0-9]+ ?x ?[0-9]+': × diff --git a/styles/proselint/Uncomparables.yml b/styles/proselint/Uncomparables.yml new file mode 100644 index 00000000..9b96f42b --- /dev/null +++ b/styles/proselint/Uncomparables.yml @@ -0,0 +1,50 @@ +extends: existence +message: "'%s' is not comparable" +ignorecase: true +level: error +action: + name: edit + params: + - split + - ' ' + - '1' +raw: + - \b(?:absolutely|most|more|less|least|very|quite|largely|extremely|increasingly|kind of|mildy|hardly|greatly|sort of)\b\s* +tokens: + - absolute + - adequate + - complete + - correct + - certain + - devoid + - entire + - 'false' + - fatal + - favorite + - final + - ideal + - impossible + - inevitable + - infinite + - irrevocable + - main + - manifest + - only + - paramount + - perfect + - perpetual + - possible + - preferable + - principal + - singular + - stationary + - sufficient + - 'true' + - unanimous + - unavoidable + - unbroken + - uniform + - unique + - universal + - void + - whole diff --git a/styles/proselint/Very.yml b/styles/proselint/Very.yml new file mode 100644 index 00000000..e4077f79 --- /dev/null +++ b/styles/proselint/Very.yml @@ -0,0 +1,6 @@ +extends: existence +message: "Remove '%s'." +ignorecase: true +level: error +tokens: + - very diff --git a/styles/proselint/meta.json b/styles/proselint/meta.json new file mode 100644 index 00000000..e3c65800 --- /dev/null +++ b/styles/proselint/meta.json @@ -0,0 +1,17 @@ +{ + "author": "jdkato", + "description": "A Vale-compatible implementation of the proselint linter.", + "email": "support@errata.ai", + "lang": "en", + "url": "https://github.com/errata-ai/proselint/releases/latest/download/proselint.zip", + "feed": "https://github.com/errata-ai/proselint/releases.atom", + "issues": "https://github.com/errata-ai/proselint/issues/new", + "license": "BSD-3-Clause", + "name": "proselint", + "sources": [ + "https://github.com/amperser/proselint" + ], + "vale_version": ">=1.0.0", + "coverage": 0.0, + "version": "0.1.0" +} diff --git a/styles/write-good/Cliches.yml b/styles/write-good/Cliches.yml new file mode 100644 index 00000000..c9531438 --- /dev/null +++ b/styles/write-good/Cliches.yml @@ -0,0 +1,702 @@ +extends: existence +message: "Try to avoid using clichés like '%s'." +ignorecase: true +level: warning +tokens: + - a chip off the old block + - a clean slate + - a dark and stormy night + - a far cry + - a fine kettle of fish + - a loose cannon + - a penny saved is a penny earned + - a tough row to hoe + - a word to the wise + - ace in the hole + - acid test + - add insult to injury + - against all odds + - air your dirty laundry + - all fun and games + - all in a day's work + - all talk, no action + - all thumbs + - all your eggs in one basket + - all's fair in love and war + - all's well that ends well + - almighty dollar + - American as apple pie + - an axe to grind + - another day, another dollar + - armed to the teeth + - as luck would have it + - as old as time + - as the crow flies + - at loose ends + - at my wits end + - avoid like the plague + - babe in the woods + - back against the wall + - back in the saddle + - back to square one + - back to the drawing board + - bad to the bone + - badge of honor + - bald faced liar + - ballpark figure + - banging your head against a brick wall + - baptism by fire + - barking up the wrong tree + - bat out of hell + - be all and end all + - beat a dead horse + - beat around the bush + - been there, done that + - beggars can't be choosers + - behind the eight ball + - bend over backwards + - benefit of the doubt + - bent out of shape + - best thing since sliced bread + - bet your bottom dollar + - better half + - better late than never + - better mousetrap + - better safe than sorry + - between a rock and a hard place + - beyond the pale + - bide your time + - big as life + - big cheese + - big fish in a small pond + - big man on campus + - bigger they are the harder they fall + - bird in the hand + - bird's eye view + - birds and the bees + - birds of a feather flock together + - bit the hand that feeds you + - bite the bullet + - bite the dust + - bitten off more than he can chew + - black as coal + - black as pitch + - black as the ace of spades + - blast from the past + - bleeding heart + - blessing in disguise + - blind ambition + - blind as a bat + - blind leading the blind + - blood is thicker than water + - blood sweat and tears + - blow off steam + - blow your own horn + - blushing bride + - boils down to + - bolt from the blue + - bone to pick + - bored stiff + - bored to tears + - bottomless pit + - boys will be boys + - bright and early + - brings home the bacon + - broad across the beam + - broken record + - brought back to reality + - bull by the horns + - bull in a china shop + - burn the midnight oil + - burning question + - burning the candle at both ends + - burst your bubble + - bury the hatchet + - busy as a bee + - by hook or by crook + - call a spade a spade + - called onto the carpet + - calm before the storm + - can of worms + - can't cut the mustard + - can't hold a candle to + - case of mistaken identity + - cat got your tongue + - cat's meow + - caught in the crossfire + - caught red-handed + - checkered past + - chomping at the bit + - cleanliness is next to godliness + - clear as a bell + - clear as mud + - close to the vest + - cock and bull story + - cold shoulder + - come hell or high water + - cool as a cucumber + - cool, calm, and collected + - cost a king's ransom + - count your blessings + - crack of dawn + - crash course + - creature comforts + - cross that bridge when you come to it + - crushing blow + - cry like a baby + - cry me a river + - cry over spilt milk + - crystal clear + - curiosity killed the cat + - cut and dried + - cut through the red tape + - cut to the chase + - cute as a bugs ear + - cute as a button + - cute as a puppy + - cuts to the quick + - dark before the dawn + - day in, day out + - dead as a doornail + - devil is in the details + - dime a dozen + - divide and conquer + - dog and pony show + - dog days + - dog eat dog + - dog tired + - don't burn your bridges + - don't count your chickens + - don't look a gift horse in the mouth + - don't rock the boat + - don't step on anyone's toes + - don't take any wooden nickels + - down and out + - down at the heels + - down in the dumps + - down the hatch + - down to earth + - draw the line + - dressed to kill + - dressed to the nines + - drives me up the wall + - dull as dishwater + - dyed in the wool + - eagle eye + - ear to the ground + - early bird catches the worm + - easier said than done + - easy as pie + - eat your heart out + - eat your words + - eleventh hour + - even the playing field + - every dog has its day + - every fiber of my being + - everything but the kitchen sink + - eye for an eye + - face the music + - facts of life + - fair weather friend + - fall by the wayside + - fan the flames + - feast or famine + - feather your nest + - feathered friends + - few and far between + - fifteen minutes of fame + - filthy vermin + - fine kettle of fish + - fish out of water + - fishing for a compliment + - fit as a fiddle + - fit the bill + - fit to be tied + - flash in the pan + - flat as a pancake + - flip your lid + - flog a dead horse + - fly by night + - fly the coop + - follow your heart + - for all intents and purposes + - for the birds + - for what it's worth + - force of nature + - force to be reckoned with + - forgive and forget + - fox in the henhouse + - free and easy + - free as a bird + - fresh as a daisy + - full steam ahead + - fun in the sun + - garbage in, garbage out + - gentle as a lamb + - get a kick out of + - get a leg up + - get down and dirty + - get the lead out + - get to the bottom of + - get your feet wet + - gets my goat + - gilding the lily + - give and take + - go against the grain + - go at it tooth and nail + - go for broke + - go him one better + - go the extra mile + - go with the flow + - goes without saying + - good as gold + - good deed for the day + - good things come to those who wait + - good time was had by all + - good times were had by all + - greased lightning + - greek to me + - green thumb + - green-eyed monster + - grist for the mill + - growing like a weed + - hair of the dog + - hand to mouth + - happy as a clam + - happy as a lark + - hasn't a clue + - have a nice day + - have high hopes + - have the last laugh + - haven't got a row to hoe + - head honcho + - head over heels + - hear a pin drop + - heard it through the grapevine + - heart's content + - heavy as lead + - hem and haw + - high and dry + - high and mighty + - high as a kite + - hit paydirt + - hold your head up high + - hold your horses + - hold your own + - hold your tongue + - honest as the day is long + - horns of a dilemma + - horse of a different color + - hot under the collar + - hour of need + - I beg to differ + - icing on the cake + - if the shoe fits + - if the shoe were on the other foot + - in a jam + - in a jiffy + - in a nutshell + - in a pig's eye + - in a pinch + - in a word + - in hot water + - in the gutter + - in the nick of time + - in the thick of it + - in your dreams + - it ain't over till the fat lady sings + - it goes without saying + - it takes all kinds + - it takes one to know one + - it's a small world + - it's only a matter of time + - ivory tower + - Jack of all trades + - jockey for position + - jog your memory + - joined at the hip + - judge a book by its cover + - jump down your throat + - jump in with both feet + - jump on the bandwagon + - jump the gun + - jump to conclusions + - just a hop, skip, and a jump + - just the ticket + - justice is blind + - keep a stiff upper lip + - keep an eye on + - keep it simple, stupid + - keep the home fires burning + - keep up with the Joneses + - keep your chin up + - keep your fingers crossed + - kick the bucket + - kick up your heels + - kick your feet up + - kid in a candy store + - kill two birds with one stone + - kiss of death + - knock it out of the park + - knock on wood + - knock your socks off + - know him from Adam + - know the ropes + - know the score + - knuckle down + - knuckle sandwich + - knuckle under + - labor of love + - ladder of success + - land on your feet + - lap of luxury + - last but not least + - last hurrah + - last-ditch effort + - law of the jungle + - law of the land + - lay down the law + - leaps and bounds + - let sleeping dogs lie + - let the cat out of the bag + - let the good times roll + - let your hair down + - let's talk turkey + - letter perfect + - lick your wounds + - lies like a rug + - life's a bitch + - life's a grind + - light at the end of the tunnel + - lighter than a feather + - lighter than air + - like clockwork + - like father like son + - like taking candy from a baby + - like there's no tomorrow + - lion's share + - live and learn + - live and let live + - long and short of it + - long lost love + - look before you leap + - look down your nose + - look what the cat dragged in + - looking a gift horse in the mouth + - looks like death warmed over + - loose cannon + - lose your head + - lose your temper + - loud as a horn + - lounge lizard + - loved and lost + - low man on the totem pole + - luck of the draw + - luck of the Irish + - make hay while the sun shines + - make money hand over fist + - make my day + - make the best of a bad situation + - make the best of it + - make your blood boil + - man of few words + - man's best friend + - mark my words + - meaningful dialogue + - missed the boat on that one + - moment in the sun + - moment of glory + - moment of truth + - money to burn + - more power to you + - more than one way to skin a cat + - movers and shakers + - moving experience + - naked as a jaybird + - naked truth + - neat as a pin + - needle in a haystack + - needless to say + - neither here nor there + - never look back + - never say never + - nip and tuck + - nip it in the bud + - no guts, no glory + - no love lost + - no pain, no gain + - no skin off my back + - no stone unturned + - no time like the present + - no use crying over spilled milk + - nose to the grindstone + - not a hope in hell + - not a minute's peace + - not in my backyard + - not playing with a full deck + - not the end of the world + - not written in stone + - nothing to sneeze at + - nothing ventured nothing gained + - now we're cooking + - off the top of my head + - off the wagon + - off the wall + - old hat + - older and wiser + - older than dirt + - older than Methuselah + - on a roll + - on cloud nine + - on pins and needles + - on the bandwagon + - on the money + - on the nose + - on the rocks + - on the spot + - on the tip of my tongue + - on the wagon + - on thin ice + - once bitten, twice shy + - one bad apple doesn't spoil the bushel + - one born every minute + - one brick short + - one foot in the grave + - one in a million + - one red cent + - only game in town + - open a can of worms + - open and shut case + - open the flood gates + - opportunity doesn't knock twice + - out of pocket + - out of sight, out of mind + - out of the frying pan into the fire + - out of the woods + - out on a limb + - over a barrel + - over the hump + - pain and suffering + - pain in the + - panic button + - par for the course + - part and parcel + - party pooper + - pass the buck + - patience is a virtue + - pay through the nose + - penny pincher + - perfect storm + - pig in a poke + - pile it on + - pillar of the community + - pin your hopes on + - pitter patter of little feet + - plain as day + - plain as the nose on your face + - play by the rules + - play your cards right + - playing the field + - playing with fire + - pleased as punch + - plenty of fish in the sea + - point with pride + - poor as a church mouse + - pot calling the kettle black + - pretty as a picture + - pull a fast one + - pull your punches + - pulling your leg + - pure as the driven snow + - put it in a nutshell + - put one over on you + - put the cart before the horse + - put the pedal to the metal + - put your best foot forward + - put your foot down + - quick as a bunny + - quick as a lick + - quick as a wink + - quick as lightning + - quiet as a dormouse + - rags to riches + - raining buckets + - raining cats and dogs + - rank and file + - rat race + - reap what you sow + - red as a beet + - red herring + - reinvent the wheel + - rich and famous + - rings a bell + - ripe old age + - ripped me off + - rise and shine + - road to hell is paved with good intentions + - rob Peter to pay Paul + - roll over in the grave + - rub the wrong way + - ruled the roost + - running in circles + - sad but true + - sadder but wiser + - salt of the earth + - scared stiff + - scared to death + - sealed with a kiss + - second to none + - see eye to eye + - seen the light + - seize the day + - set the record straight + - set the world on fire + - set your teeth on edge + - sharp as a tack + - shoot for the moon + - shoot the breeze + - shot in the dark + - shoulder to the wheel + - sick as a dog + - sigh of relief + - signed, sealed, and delivered + - sink or swim + - six of one, half a dozen of another + - skating on thin ice + - slept like a log + - slinging mud + - slippery as an eel + - slow as molasses + - smart as a whip + - smooth as a baby's bottom + - sneaking suspicion + - snug as a bug in a rug + - sow wild oats + - spare the rod, spoil the child + - speak of the devil + - spilled the beans + - spinning your wheels + - spitting image of + - spoke with relish + - spread like wildfire + - spring to life + - squeaky wheel gets the grease + - stands out like a sore thumb + - start from scratch + - stick in the mud + - still waters run deep + - stitch in time + - stop and smell the roses + - straight as an arrow + - straw that broke the camel's back + - strong as an ox + - stubborn as a mule + - stuff that dreams are made of + - stuffed shirt + - sweating blood + - sweating bullets + - take a load off + - take one for the team + - take the bait + - take the bull by the horns + - take the plunge + - takes one to know one + - takes two to tango + - the more the merrier + - the real deal + - the real McCoy + - the red carpet treatment + - the same old story + - there is no accounting for taste + - thick as a brick + - thick as thieves + - thin as a rail + - think outside of the box + - third time's the charm + - this day and age + - this hurts me worse than it hurts you + - this point in time + - three sheets to the wind + - through thick and thin + - throw in the towel + - tie one on + - tighter than a drum + - time and time again + - time is of the essence + - tip of the iceberg + - tired but happy + - to coin a phrase + - to each his own + - to make a long story short + - to the best of my knowledge + - toe the line + - tongue in cheek + - too good to be true + - too hot to handle + - too numerous to mention + - touch with a ten foot pole + - tough as nails + - trial and error + - trials and tribulations + - tried and true + - trip down memory lane + - twist of fate + - two cents worth + - two peas in a pod + - ugly as sin + - under the counter + - under the gun + - under the same roof + - under the weather + - until the cows come home + - unvarnished truth + - up the creek + - uphill battle + - upper crust + - upset the applecart + - vain attempt + - vain effort + - vanquish the enemy + - vested interest + - waiting for the other shoe to drop + - wakeup call + - warm welcome + - watch your p's and q's + - watch your tongue + - watching the clock + - water under the bridge + - weather the storm + - weed them out + - week of Sundays + - went belly up + - wet behind the ears + - what goes around comes around + - what you see is what you get + - when it rains, it pours + - when push comes to shove + - when the cat's away + - when the going gets tough, the tough get going + - white as a sheet + - whole ball of wax + - whole hog + - whole nine yards + - wild goose chase + - will wonders never cease? + - wisdom of the ages + - wise as an owl + - wolf at the door + - words fail me + - work like a dog + - world weary + - worst nightmare + - worth its weight in gold + - wrong side of the bed + - yanking your chain + - yappy as a dog + - years young + - you are what you eat + - you can run but you can't hide + - you only live once + - you're the boss + - young and foolish + - young and vibrant diff --git a/styles/write-good/E-Prime.yml b/styles/write-good/E-Prime.yml new file mode 100644 index 00000000..074a102b --- /dev/null +++ b/styles/write-good/E-Prime.yml @@ -0,0 +1,32 @@ +extends: existence +message: "Try to avoid using '%s'." +ignorecase: true +level: suggestion +tokens: + - am + - are + - aren't + - be + - been + - being + - he's + - here's + - here's + - how's + - i'm + - is + - isn't + - it's + - she's + - that's + - there's + - they're + - was + - wasn't + - we're + - were + - weren't + - what's + - where's + - who's + - you're diff --git a/styles/write-good/Illusions.yml b/styles/write-good/Illusions.yml new file mode 100644 index 00000000..b4f13218 --- /dev/null +++ b/styles/write-good/Illusions.yml @@ -0,0 +1,11 @@ +extends: repetition +message: "'%s' is repeated!" +level: warning +alpha: true +action: + name: edit + params: + - truncate + - " " +tokens: + - '[^\s]+' diff --git a/styles/write-good/Passive.yml b/styles/write-good/Passive.yml new file mode 100644 index 00000000..f472cb90 --- /dev/null +++ b/styles/write-good/Passive.yml @@ -0,0 +1,183 @@ +extends: existence +message: "'%s' may be passive voice. Use active voice if you can." +ignorecase: true +level: warning +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/styles/write-good/README.md b/styles/write-good/README.md new file mode 100644 index 00000000..3edcc9b3 --- /dev/null +++ b/styles/write-good/README.md @@ -0,0 +1,27 @@ +Based on [write-good](https://github.com/btford/write-good). + +> Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too. + +``` +The MIT License (MIT) + +Copyright (c) 2014 Brian Ford + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/styles/write-good/So.yml b/styles/write-good/So.yml new file mode 100644 index 00000000..e57f099d --- /dev/null +++ b/styles/write-good/So.yml @@ -0,0 +1,5 @@ +extends: existence +message: "Don't start a sentence with '%s'." +level: error +raw: + - '(?:[;-]\s)so[\s,]|\bSo[\s,]' diff --git a/styles/write-good/ThereIs.yml b/styles/write-good/ThereIs.yml new file mode 100644 index 00000000..8b82e8f6 --- /dev/null +++ b/styles/write-good/ThereIs.yml @@ -0,0 +1,6 @@ +extends: existence +message: "Don't start a sentence with '%s'." +ignorecase: false +level: error +raw: + - '(?:[;-]\s)There\s(is|are)|\bThere\s(is|are)\b' diff --git a/styles/write-good/TooWordy.yml b/styles/write-good/TooWordy.yml new file mode 100644 index 00000000..275701b1 --- /dev/null +++ b/styles/write-good/TooWordy.yml @@ -0,0 +1,221 @@ +extends: existence +message: "'%s' is too wordy." +ignorecase: true +level: warning +tokens: + - a number of + - abundance + - accede to + - accelerate + - accentuate + - accompany + - accomplish + - accorded + - accrue + - acquiesce + - acquire + - additional + - adjacent to + - adjustment + - admissible + - advantageous + - adversely impact + - advise + - aforementioned + - aggregate + - aircraft + - all of + - all things considered + - alleviate + - allocate + - along the lines of + - already existing + - alternatively + - amazing + - ameliorate + - anticipate + - apparent + - appreciable + - as a matter of fact + - as a means of + - as far as I'm concerned + - as of yet + - as to + - as yet + - ascertain + - assistance + - at the present time + - at this time + - attain + - attributable to + - authorize + - because of the fact that + - belated + - benefit from + - bestow + - by means of + - by virtue of + - by virtue of the fact that + - cease + - close proximity + - commence + - comply with + - concerning + - consequently + - consolidate + - constitutes + - demonstrate + - depart + - designate + - discontinue + - due to the fact that + - each and every + - economical + - eliminate + - elucidate + - employ + - endeavor + - enumerate + - equitable + - equivalent + - evaluate + - evidenced + - exclusively + - expedite + - expend + - expiration + - facilitate + - factual evidence + - feasible + - finalize + - first and foremost + - for all intents and purposes + - for the most part + - for the purpose of + - forfeit + - formulate + - have a tendency to + - honest truth + - however + - if and when + - impacted + - implement + - in a manner of speaking + - in a timely manner + - in a very real sense + - in accordance with + - in addition + - in all likelihood + - in an effort to + - in between + - in excess of + - in lieu of + - in light of the fact that + - in many cases + - in my opinion + - in order to + - in regard to + - in some instances + - in terms of + - in the case of + - in the event that + - in the final analysis + - in the nature of + - in the near future + - in the process of + - inception + - incumbent upon + - indicate + - indication + - initiate + - irregardless + - is applicable to + - is authorized to + - is responsible for + - it is + - it is essential + - it seems that + - it was + - magnitude + - maximum + - methodology + - minimize + - minimum + - modify + - monitor + - multiple + - necessitate + - nevertheless + - not certain + - not many + - not often + - not unless + - not unlike + - notwithstanding + - null and void + - numerous + - objective + - obligate + - obtain + - on the contrary + - on the other hand + - one particular + - optimum + - overall + - owing to the fact that + - participate + - particulars + - pass away + - pertaining to + - point in time + - portion + - possess + - preclude + - previously + - prior to + - prioritize + - procure + - proficiency + - provided that + - purchase + - put simply + - readily apparent + - refer back + - regarding + - relocate + - remainder + - remuneration + - requirement + - reside + - residence + - retain + - satisfy + - shall + - should you wish + - similar to + - solicit + - span across + - strategize + - subsequent + - substantial + - successfully complete + - sufficient + - terminate + - the month of + - the point I am trying to make + - therefore + - time period + - took advantage of + - transmit + - transpire + - type of + - until such time as + - utilization + - utilize + - validate + - various different + - what I mean to say is + - whether or not + - with respect to + - with the exception of + - witnessed diff --git a/styles/write-good/Weasel.yml b/styles/write-good/Weasel.yml new file mode 100644 index 00000000..e2939144 --- /dev/null +++ b/styles/write-good/Weasel.yml @@ -0,0 +1,207 @@ +extends: existence +message: "'%s' is a weasel word!" +ignorecase: true +level: warning +tokens: + - absolutely + - accidentally + - additionally + - allegedly + - alternatively + - angrily + - anxiously + - approximately + - awkwardly + - badly + - barely + - beautifully + - blindly + - boldly + - bravely + - brightly + - briskly + - bristly + - bubbly + - busily + - calmly + - carefully + - carelessly + - cautiously + - cheerfully + - clearly + - closely + - coldly + - completely + - consequently + - correctly + - courageously + - crinkly + - cruelly + - crumbly + - cuddly + - currently + - daily + - daringly + - deadly + - definitely + - deliberately + - doubtfully + - dumbly + - eagerly + - early + - easily + - elegantly + - enormously + - enthusiastically + - equally + - especially + - eventually + - exactly + - exceedingly + - exclusively + - extremely + - fairly + - faithfully + - fatally + - fiercely + - finally + - fondly + - few + - foolishly + - fortunately + - frankly + - frantically + - generously + - gently + - giggly + - gladly + - gracefully + - greedily + - happily + - hardly + - hastily + - healthily + - heartily + - helpfully + - honestly + - hourly + - hungrily + - hurriedly + - immediately + - impatiently + - inadequately + - ingeniously + - innocently + - inquisitively + - interestingly + - irritably + - jiggly + - joyously + - justly + - kindly + - largely + - lately + - lazily + - likely + - literally + - lonely + - loosely + - loudly + - loudly + - luckily + - madly + - many + - mentally + - mildly + - monthly + - mortally + - mostly + - mysteriously + - neatly + - nervously + - nightly + - noisily + - normally + - obediently + - occasionally + - only + - openly + - painfully + - particularly + - patiently + - perfectly + - politely + - poorly + - powerfully + - presumably + - previously + - promptly + - punctually + - quarterly + - quickly + - quietly + - rapidly + - rarely + - really + - recently + - recklessly + - regularly + - remarkably + - relatively + - reluctantly + - repeatedly + - rightfully + - roughly + - rudely + - sadly + - safely + - selfishly + - sensibly + - seriously + - sharply + - shortly + - shyly + - significantly + - silently + - simply + - sleepily + - slowly + - smartly + - smelly + - smoothly + - softly + - solemnly + - sparkly + - speedily + - stealthily + - sternly + - stupidly + - substantially + - successfully + - suddenly + - surprisingly + - suspiciously + - swiftly + - tenderly + - tensely + - thoughtfully + - tightly + - timely + - truthfully + - unexpectedly + - unfortunately + - usually + - very + - victoriously + - violently + - vivaciously + - warmly + - waverly + - weakly + - wearily + - weekly + - wildly + - wisely + - worldly + - wrinkly + - yearly diff --git a/styles/write-good/meta.json b/styles/write-good/meta.json new file mode 100644 index 00000000..a115d288 --- /dev/null +++ b/styles/write-good/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/write-good/releases.atom", + "vale_version": ">=1.0.0" +} From 35ccc627386b94d196ea281ab153770121f96592 Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 17:55:51 +0200 Subject: [PATCH 2/7] Automatically run vale on test-build on ci This fixes #144. --- {styles => .github/styles}/Google/AMPM.yml | 0 {styles => .github/styles}/Google/Acronyms.yml | 0 {styles => .github/styles}/Google/Colons.yml | 0 {styles => .github/styles}/Google/Contractions.yml | 0 {styles => .github/styles}/Google/DateFormat.yml | 0 {styles => .github/styles}/Google/Ellipses.yml | 0 {styles => .github/styles}/Google/EmDash.yml | 0 {styles => .github/styles}/Google/EnDash.yml | 0 {styles => .github/styles}/Google/Exclamation.yml | 0 {styles => .github/styles}/Google/FirstPerson.yml | 0 {styles => .github/styles}/Google/Gender.yml | 0 {styles => .github/styles}/Google/GenderBias.yml | 0 {styles => .github/styles}/Google/HeadingPunctuation.yml | 0 {styles => .github/styles}/Google/Headings.yml | 0 {styles => .github/styles}/Google/Latin.yml | 0 {styles => .github/styles}/Google/LyHyphens.yml | 0 {styles => .github/styles}/Google/OptionalPlurals.yml | 0 {styles => .github/styles}/Google/Ordinal.yml | 0 {styles => .github/styles}/Google/OxfordComma.yml | 0 {styles => .github/styles}/Google/Parens.yml | 0 {styles => .github/styles}/Google/Passive.yml | 0 {styles => .github/styles}/Google/Periods.yml | 0 {styles => .github/styles}/Google/Quotes.yml | 0 {styles => .github/styles}/Google/Ranges.yml | 0 {styles => .github/styles}/Google/Semicolons.yml | 0 {styles => .github/styles}/Google/Slang.yml | 0 {styles => .github/styles}/Google/Spacing.yml | 0 {styles => .github/styles}/Google/Spelling.yml | 0 {styles => .github/styles}/Google/Units.yml | 0 {styles => .github/styles}/Google/We.yml | 0 {styles => .github/styles}/Google/Will.yml | 0 {styles => .github/styles}/Google/WordList.yml | 0 {styles => .github/styles}/Google/meta.json | 0 {styles => .github/styles}/Google/vocab.txt | 0 {styles => .github/styles}/Vocab/Docs/accept.txt | 0 {styles => .github/styles}/Vocab/Docs/reject.txt | 0 {styles => .github/styles}/proselint/Airlinese.yml | 0 {styles => .github/styles}/proselint/AnimalLabels.yml | 0 {styles => .github/styles}/proselint/Annotations.yml | 0 {styles => .github/styles}/proselint/Apologizing.yml | 0 {styles => .github/styles}/proselint/Archaisms.yml | 0 {styles => .github/styles}/proselint/But.yml | 0 {styles => .github/styles}/proselint/Cliches.yml | 0 {styles => .github/styles}/proselint/CorporateSpeak.yml | 0 {styles => .github/styles}/proselint/Currency.yml | 0 {styles => .github/styles}/proselint/Cursing.yml | 0 {styles => .github/styles}/proselint/DateCase.yml | 0 {styles => .github/styles}/proselint/DateMidnight.yml | 0 {styles => .github/styles}/proselint/DateRedundancy.yml | 0 {styles => .github/styles}/proselint/DateSpacing.yml | 0 {styles => .github/styles}/proselint/DenizenLabels.yml | 0 {styles => .github/styles}/proselint/Diacritical.yml | 0 {styles => .github/styles}/proselint/GenderBias.yml | 0 {styles => .github/styles}/proselint/GroupTerms.yml | 0 {styles => .github/styles}/proselint/Hedging.yml | 0 {styles => .github/styles}/proselint/Hyperbole.yml | 0 {styles => .github/styles}/proselint/Jargon.yml | 0 {styles => .github/styles}/proselint/LGBTOffensive.yml | 0 {styles => .github/styles}/proselint/LGBTTerms.yml | 0 {styles => .github/styles}/proselint/Malapropisms.yml | 0 {styles => .github/styles}/proselint/Needless.yml | 0 {styles => .github/styles}/proselint/Nonwords.yml | 0 {styles => .github/styles}/proselint/Oxymorons.yml | 0 {styles => .github/styles}/proselint/P-Value.yml | 0 {styles => .github/styles}/proselint/RASSyndrome.yml | 0 {styles => .github/styles}/proselint/README.md | 0 {styles => .github/styles}/proselint/Skunked.yml | 0 {styles => .github/styles}/proselint/Spelling.yml | 0 {styles => .github/styles}/proselint/Typography.yml | 0 {styles => .github/styles}/proselint/Uncomparables.yml | 0 {styles => .github/styles}/proselint/Very.yml | 0 {styles => .github/styles}/proselint/meta.json | 0 {styles => .github/styles}/write-good/Cliches.yml | 0 {styles => .github/styles}/write-good/E-Prime.yml | 0 {styles => .github/styles}/write-good/Illusions.yml | 0 {styles => .github/styles}/write-good/Passive.yml | 0 {styles => .github/styles}/write-good/README.md | 0 {styles => .github/styles}/write-good/So.yml | 0 {styles => .github/styles}/write-good/ThereIs.yml | 0 {styles => .github/styles}/write-good/TooWordy.yml | 0 {styles => .github/styles}/write-good/Weasel.yml | 0 {styles => .github/styles}/write-good/meta.json | 0 .github/workflows/test-build.yml | 5 +++++ .vale.ini | 2 +- 84 files changed, 6 insertions(+), 1 deletion(-) rename {styles => .github/styles}/Google/AMPM.yml (100%) rename {styles => .github/styles}/Google/Acronyms.yml (100%) rename {styles => .github/styles}/Google/Colons.yml (100%) rename {styles => .github/styles}/Google/Contractions.yml (100%) rename {styles => .github/styles}/Google/DateFormat.yml (100%) rename {styles => .github/styles}/Google/Ellipses.yml (100%) rename {styles => .github/styles}/Google/EmDash.yml (100%) rename {styles => .github/styles}/Google/EnDash.yml (100%) rename {styles => .github/styles}/Google/Exclamation.yml (100%) rename {styles => .github/styles}/Google/FirstPerson.yml (100%) rename {styles => .github/styles}/Google/Gender.yml (100%) rename {styles => .github/styles}/Google/GenderBias.yml (100%) rename {styles => .github/styles}/Google/HeadingPunctuation.yml (100%) rename {styles => .github/styles}/Google/Headings.yml (100%) rename {styles => .github/styles}/Google/Latin.yml (100%) rename {styles => .github/styles}/Google/LyHyphens.yml (100%) rename {styles => .github/styles}/Google/OptionalPlurals.yml (100%) rename {styles => .github/styles}/Google/Ordinal.yml (100%) rename {styles => .github/styles}/Google/OxfordComma.yml (100%) rename {styles => .github/styles}/Google/Parens.yml (100%) rename {styles => .github/styles}/Google/Passive.yml (100%) rename {styles => .github/styles}/Google/Periods.yml (100%) rename {styles => .github/styles}/Google/Quotes.yml (100%) rename {styles => .github/styles}/Google/Ranges.yml (100%) rename {styles => .github/styles}/Google/Semicolons.yml (100%) rename {styles => .github/styles}/Google/Slang.yml (100%) rename {styles => .github/styles}/Google/Spacing.yml (100%) rename {styles => .github/styles}/Google/Spelling.yml (100%) rename {styles => .github/styles}/Google/Units.yml (100%) rename {styles => .github/styles}/Google/We.yml (100%) rename {styles => .github/styles}/Google/Will.yml (100%) rename {styles => .github/styles}/Google/WordList.yml (100%) rename {styles => .github/styles}/Google/meta.json (100%) rename {styles => .github/styles}/Google/vocab.txt (100%) rename {styles => .github/styles}/Vocab/Docs/accept.txt (100%) rename {styles => .github/styles}/Vocab/Docs/reject.txt (100%) rename {styles => .github/styles}/proselint/Airlinese.yml (100%) rename {styles => .github/styles}/proselint/AnimalLabels.yml (100%) rename {styles => .github/styles}/proselint/Annotations.yml (100%) rename {styles => .github/styles}/proselint/Apologizing.yml (100%) rename {styles => .github/styles}/proselint/Archaisms.yml (100%) rename {styles => .github/styles}/proselint/But.yml (100%) rename {styles => .github/styles}/proselint/Cliches.yml (100%) rename {styles => .github/styles}/proselint/CorporateSpeak.yml (100%) rename {styles => .github/styles}/proselint/Currency.yml (100%) rename {styles => .github/styles}/proselint/Cursing.yml (100%) rename {styles => .github/styles}/proselint/DateCase.yml (100%) rename {styles => .github/styles}/proselint/DateMidnight.yml (100%) rename {styles => .github/styles}/proselint/DateRedundancy.yml (100%) rename {styles => .github/styles}/proselint/DateSpacing.yml (100%) rename {styles => .github/styles}/proselint/DenizenLabels.yml (100%) rename {styles => .github/styles}/proselint/Diacritical.yml (100%) rename {styles => .github/styles}/proselint/GenderBias.yml (100%) rename {styles => .github/styles}/proselint/GroupTerms.yml (100%) rename {styles => .github/styles}/proselint/Hedging.yml (100%) rename {styles => .github/styles}/proselint/Hyperbole.yml (100%) rename {styles => .github/styles}/proselint/Jargon.yml (100%) rename {styles => .github/styles}/proselint/LGBTOffensive.yml (100%) rename {styles => .github/styles}/proselint/LGBTTerms.yml (100%) rename {styles => .github/styles}/proselint/Malapropisms.yml (100%) rename {styles => .github/styles}/proselint/Needless.yml (100%) rename {styles => .github/styles}/proselint/Nonwords.yml (100%) rename {styles => .github/styles}/proselint/Oxymorons.yml (100%) rename {styles => .github/styles}/proselint/P-Value.yml (100%) rename {styles => .github/styles}/proselint/RASSyndrome.yml (100%) rename {styles => .github/styles}/proselint/README.md (100%) rename {styles => .github/styles}/proselint/Skunked.yml (100%) rename {styles => .github/styles}/proselint/Spelling.yml (100%) rename {styles => .github/styles}/proselint/Typography.yml (100%) rename {styles => .github/styles}/proselint/Uncomparables.yml (100%) rename {styles => .github/styles}/proselint/Very.yml (100%) rename {styles => .github/styles}/proselint/meta.json (100%) rename {styles => .github/styles}/write-good/Cliches.yml (100%) rename {styles => .github/styles}/write-good/E-Prime.yml (100%) rename {styles => .github/styles}/write-good/Illusions.yml (100%) rename {styles => .github/styles}/write-good/Passive.yml (100%) rename {styles => .github/styles}/write-good/README.md (100%) rename {styles => .github/styles}/write-good/So.yml (100%) rename {styles => .github/styles}/write-good/ThereIs.yml (100%) rename {styles => .github/styles}/write-good/TooWordy.yml (100%) rename {styles => .github/styles}/write-good/Weasel.yml (100%) rename {styles => .github/styles}/write-good/meta.json (100%) diff --git a/styles/Google/AMPM.yml b/.github/styles/Google/AMPM.yml similarity index 100% rename from styles/Google/AMPM.yml rename to .github/styles/Google/AMPM.yml diff --git a/styles/Google/Acronyms.yml b/.github/styles/Google/Acronyms.yml similarity index 100% rename from styles/Google/Acronyms.yml rename to .github/styles/Google/Acronyms.yml diff --git a/styles/Google/Colons.yml b/.github/styles/Google/Colons.yml similarity index 100% rename from styles/Google/Colons.yml rename to .github/styles/Google/Colons.yml diff --git a/styles/Google/Contractions.yml b/.github/styles/Google/Contractions.yml similarity index 100% rename from styles/Google/Contractions.yml rename to .github/styles/Google/Contractions.yml diff --git a/styles/Google/DateFormat.yml b/.github/styles/Google/DateFormat.yml similarity index 100% rename from styles/Google/DateFormat.yml rename to .github/styles/Google/DateFormat.yml diff --git a/styles/Google/Ellipses.yml b/.github/styles/Google/Ellipses.yml similarity index 100% rename from styles/Google/Ellipses.yml rename to .github/styles/Google/Ellipses.yml diff --git a/styles/Google/EmDash.yml b/.github/styles/Google/EmDash.yml similarity index 100% rename from styles/Google/EmDash.yml rename to .github/styles/Google/EmDash.yml diff --git a/styles/Google/EnDash.yml b/.github/styles/Google/EnDash.yml similarity index 100% rename from styles/Google/EnDash.yml rename to .github/styles/Google/EnDash.yml diff --git a/styles/Google/Exclamation.yml b/.github/styles/Google/Exclamation.yml similarity index 100% rename from styles/Google/Exclamation.yml rename to .github/styles/Google/Exclamation.yml diff --git a/styles/Google/FirstPerson.yml b/.github/styles/Google/FirstPerson.yml similarity index 100% rename from styles/Google/FirstPerson.yml rename to .github/styles/Google/FirstPerson.yml diff --git a/styles/Google/Gender.yml b/.github/styles/Google/Gender.yml similarity index 100% rename from styles/Google/Gender.yml rename to .github/styles/Google/Gender.yml diff --git a/styles/Google/GenderBias.yml b/.github/styles/Google/GenderBias.yml similarity index 100% rename from styles/Google/GenderBias.yml rename to .github/styles/Google/GenderBias.yml diff --git a/styles/Google/HeadingPunctuation.yml b/.github/styles/Google/HeadingPunctuation.yml similarity index 100% rename from styles/Google/HeadingPunctuation.yml rename to .github/styles/Google/HeadingPunctuation.yml diff --git a/styles/Google/Headings.yml b/.github/styles/Google/Headings.yml similarity index 100% rename from styles/Google/Headings.yml rename to .github/styles/Google/Headings.yml diff --git a/styles/Google/Latin.yml b/.github/styles/Google/Latin.yml similarity index 100% rename from styles/Google/Latin.yml rename to .github/styles/Google/Latin.yml diff --git a/styles/Google/LyHyphens.yml b/.github/styles/Google/LyHyphens.yml similarity index 100% rename from styles/Google/LyHyphens.yml rename to .github/styles/Google/LyHyphens.yml diff --git a/styles/Google/OptionalPlurals.yml b/.github/styles/Google/OptionalPlurals.yml similarity index 100% rename from styles/Google/OptionalPlurals.yml rename to .github/styles/Google/OptionalPlurals.yml diff --git a/styles/Google/Ordinal.yml b/.github/styles/Google/Ordinal.yml similarity index 100% rename from styles/Google/Ordinal.yml rename to .github/styles/Google/Ordinal.yml diff --git a/styles/Google/OxfordComma.yml b/.github/styles/Google/OxfordComma.yml similarity index 100% rename from styles/Google/OxfordComma.yml rename to .github/styles/Google/OxfordComma.yml diff --git a/styles/Google/Parens.yml b/.github/styles/Google/Parens.yml similarity index 100% rename from styles/Google/Parens.yml rename to .github/styles/Google/Parens.yml diff --git a/styles/Google/Passive.yml b/.github/styles/Google/Passive.yml similarity index 100% rename from styles/Google/Passive.yml rename to .github/styles/Google/Passive.yml diff --git a/styles/Google/Periods.yml b/.github/styles/Google/Periods.yml similarity index 100% rename from styles/Google/Periods.yml rename to .github/styles/Google/Periods.yml diff --git a/styles/Google/Quotes.yml b/.github/styles/Google/Quotes.yml similarity index 100% rename from styles/Google/Quotes.yml rename to .github/styles/Google/Quotes.yml diff --git a/styles/Google/Ranges.yml b/.github/styles/Google/Ranges.yml similarity index 100% rename from styles/Google/Ranges.yml rename to .github/styles/Google/Ranges.yml diff --git a/styles/Google/Semicolons.yml b/.github/styles/Google/Semicolons.yml similarity index 100% rename from styles/Google/Semicolons.yml rename to .github/styles/Google/Semicolons.yml diff --git a/styles/Google/Slang.yml b/.github/styles/Google/Slang.yml similarity index 100% rename from styles/Google/Slang.yml rename to .github/styles/Google/Slang.yml diff --git a/styles/Google/Spacing.yml b/.github/styles/Google/Spacing.yml similarity index 100% rename from styles/Google/Spacing.yml rename to .github/styles/Google/Spacing.yml diff --git a/styles/Google/Spelling.yml b/.github/styles/Google/Spelling.yml similarity index 100% rename from styles/Google/Spelling.yml rename to .github/styles/Google/Spelling.yml diff --git a/styles/Google/Units.yml b/.github/styles/Google/Units.yml similarity index 100% rename from styles/Google/Units.yml rename to .github/styles/Google/Units.yml diff --git a/styles/Google/We.yml b/.github/styles/Google/We.yml similarity index 100% rename from styles/Google/We.yml rename to .github/styles/Google/We.yml diff --git a/styles/Google/Will.yml b/.github/styles/Google/Will.yml similarity index 100% rename from styles/Google/Will.yml rename to .github/styles/Google/Will.yml diff --git a/styles/Google/WordList.yml b/.github/styles/Google/WordList.yml similarity index 100% rename from styles/Google/WordList.yml rename to .github/styles/Google/WordList.yml diff --git a/styles/Google/meta.json b/.github/styles/Google/meta.json similarity index 100% rename from styles/Google/meta.json rename to .github/styles/Google/meta.json diff --git a/styles/Google/vocab.txt b/.github/styles/Google/vocab.txt similarity index 100% rename from styles/Google/vocab.txt rename to .github/styles/Google/vocab.txt diff --git a/styles/Vocab/Docs/accept.txt b/.github/styles/Vocab/Docs/accept.txt similarity index 100% rename from styles/Vocab/Docs/accept.txt rename to .github/styles/Vocab/Docs/accept.txt diff --git a/styles/Vocab/Docs/reject.txt b/.github/styles/Vocab/Docs/reject.txt similarity index 100% rename from styles/Vocab/Docs/reject.txt rename to .github/styles/Vocab/Docs/reject.txt diff --git a/styles/proselint/Airlinese.yml b/.github/styles/proselint/Airlinese.yml similarity index 100% rename from styles/proselint/Airlinese.yml rename to .github/styles/proselint/Airlinese.yml diff --git a/styles/proselint/AnimalLabels.yml b/.github/styles/proselint/AnimalLabels.yml similarity index 100% rename from styles/proselint/AnimalLabels.yml rename to .github/styles/proselint/AnimalLabels.yml diff --git a/styles/proselint/Annotations.yml b/.github/styles/proselint/Annotations.yml similarity index 100% rename from styles/proselint/Annotations.yml rename to .github/styles/proselint/Annotations.yml diff --git a/styles/proselint/Apologizing.yml b/.github/styles/proselint/Apologizing.yml similarity index 100% rename from styles/proselint/Apologizing.yml rename to .github/styles/proselint/Apologizing.yml diff --git a/styles/proselint/Archaisms.yml b/.github/styles/proselint/Archaisms.yml similarity index 100% rename from styles/proselint/Archaisms.yml rename to .github/styles/proselint/Archaisms.yml diff --git a/styles/proselint/But.yml b/.github/styles/proselint/But.yml similarity index 100% rename from styles/proselint/But.yml rename to .github/styles/proselint/But.yml diff --git a/styles/proselint/Cliches.yml b/.github/styles/proselint/Cliches.yml similarity index 100% rename from styles/proselint/Cliches.yml rename to .github/styles/proselint/Cliches.yml diff --git a/styles/proselint/CorporateSpeak.yml b/.github/styles/proselint/CorporateSpeak.yml similarity index 100% rename from styles/proselint/CorporateSpeak.yml rename to .github/styles/proselint/CorporateSpeak.yml diff --git a/styles/proselint/Currency.yml b/.github/styles/proselint/Currency.yml similarity index 100% rename from styles/proselint/Currency.yml rename to .github/styles/proselint/Currency.yml diff --git a/styles/proselint/Cursing.yml b/.github/styles/proselint/Cursing.yml similarity index 100% rename from styles/proselint/Cursing.yml rename to .github/styles/proselint/Cursing.yml diff --git a/styles/proselint/DateCase.yml b/.github/styles/proselint/DateCase.yml similarity index 100% rename from styles/proselint/DateCase.yml rename to .github/styles/proselint/DateCase.yml diff --git a/styles/proselint/DateMidnight.yml b/.github/styles/proselint/DateMidnight.yml similarity index 100% rename from styles/proselint/DateMidnight.yml rename to .github/styles/proselint/DateMidnight.yml diff --git a/styles/proselint/DateRedundancy.yml b/.github/styles/proselint/DateRedundancy.yml similarity index 100% rename from styles/proselint/DateRedundancy.yml rename to .github/styles/proselint/DateRedundancy.yml diff --git a/styles/proselint/DateSpacing.yml b/.github/styles/proselint/DateSpacing.yml similarity index 100% rename from styles/proselint/DateSpacing.yml rename to .github/styles/proselint/DateSpacing.yml diff --git a/styles/proselint/DenizenLabels.yml b/.github/styles/proselint/DenizenLabels.yml similarity index 100% rename from styles/proselint/DenizenLabels.yml rename to .github/styles/proselint/DenizenLabels.yml diff --git a/styles/proselint/Diacritical.yml b/.github/styles/proselint/Diacritical.yml similarity index 100% rename from styles/proselint/Diacritical.yml rename to .github/styles/proselint/Diacritical.yml diff --git a/styles/proselint/GenderBias.yml b/.github/styles/proselint/GenderBias.yml similarity index 100% rename from styles/proselint/GenderBias.yml rename to .github/styles/proselint/GenderBias.yml diff --git a/styles/proselint/GroupTerms.yml b/.github/styles/proselint/GroupTerms.yml similarity index 100% rename from styles/proselint/GroupTerms.yml rename to .github/styles/proselint/GroupTerms.yml diff --git a/styles/proselint/Hedging.yml b/.github/styles/proselint/Hedging.yml similarity index 100% rename from styles/proselint/Hedging.yml rename to .github/styles/proselint/Hedging.yml diff --git a/styles/proselint/Hyperbole.yml b/.github/styles/proselint/Hyperbole.yml similarity index 100% rename from styles/proselint/Hyperbole.yml rename to .github/styles/proselint/Hyperbole.yml diff --git a/styles/proselint/Jargon.yml b/.github/styles/proselint/Jargon.yml similarity index 100% rename from styles/proselint/Jargon.yml rename to .github/styles/proselint/Jargon.yml diff --git a/styles/proselint/LGBTOffensive.yml b/.github/styles/proselint/LGBTOffensive.yml similarity index 100% rename from styles/proselint/LGBTOffensive.yml rename to .github/styles/proselint/LGBTOffensive.yml diff --git a/styles/proselint/LGBTTerms.yml b/.github/styles/proselint/LGBTTerms.yml similarity index 100% rename from styles/proselint/LGBTTerms.yml rename to .github/styles/proselint/LGBTTerms.yml diff --git a/styles/proselint/Malapropisms.yml b/.github/styles/proselint/Malapropisms.yml similarity index 100% rename from styles/proselint/Malapropisms.yml rename to .github/styles/proselint/Malapropisms.yml diff --git a/styles/proselint/Needless.yml b/.github/styles/proselint/Needless.yml similarity index 100% rename from styles/proselint/Needless.yml rename to .github/styles/proselint/Needless.yml diff --git a/styles/proselint/Nonwords.yml b/.github/styles/proselint/Nonwords.yml similarity index 100% rename from styles/proselint/Nonwords.yml rename to .github/styles/proselint/Nonwords.yml diff --git a/styles/proselint/Oxymorons.yml b/.github/styles/proselint/Oxymorons.yml similarity index 100% rename from styles/proselint/Oxymorons.yml rename to .github/styles/proselint/Oxymorons.yml diff --git a/styles/proselint/P-Value.yml b/.github/styles/proselint/P-Value.yml similarity index 100% rename from styles/proselint/P-Value.yml rename to .github/styles/proselint/P-Value.yml diff --git a/styles/proselint/RASSyndrome.yml b/.github/styles/proselint/RASSyndrome.yml similarity index 100% rename from styles/proselint/RASSyndrome.yml rename to .github/styles/proselint/RASSyndrome.yml diff --git a/styles/proselint/README.md b/.github/styles/proselint/README.md similarity index 100% rename from styles/proselint/README.md rename to .github/styles/proselint/README.md diff --git a/styles/proselint/Skunked.yml b/.github/styles/proselint/Skunked.yml similarity index 100% rename from styles/proselint/Skunked.yml rename to .github/styles/proselint/Skunked.yml diff --git a/styles/proselint/Spelling.yml b/.github/styles/proselint/Spelling.yml similarity index 100% rename from styles/proselint/Spelling.yml rename to .github/styles/proselint/Spelling.yml diff --git a/styles/proselint/Typography.yml b/.github/styles/proselint/Typography.yml similarity index 100% rename from styles/proselint/Typography.yml rename to .github/styles/proselint/Typography.yml diff --git a/styles/proselint/Uncomparables.yml b/.github/styles/proselint/Uncomparables.yml similarity index 100% rename from styles/proselint/Uncomparables.yml rename to .github/styles/proselint/Uncomparables.yml diff --git a/styles/proselint/Very.yml b/.github/styles/proselint/Very.yml similarity index 100% rename from styles/proselint/Very.yml rename to .github/styles/proselint/Very.yml diff --git a/styles/proselint/meta.json b/.github/styles/proselint/meta.json similarity index 100% rename from styles/proselint/meta.json rename to .github/styles/proselint/meta.json diff --git a/styles/write-good/Cliches.yml b/.github/styles/write-good/Cliches.yml similarity index 100% rename from styles/write-good/Cliches.yml rename to .github/styles/write-good/Cliches.yml diff --git a/styles/write-good/E-Prime.yml b/.github/styles/write-good/E-Prime.yml similarity index 100% rename from styles/write-good/E-Prime.yml rename to .github/styles/write-good/E-Prime.yml diff --git a/styles/write-good/Illusions.yml b/.github/styles/write-good/Illusions.yml similarity index 100% rename from styles/write-good/Illusions.yml rename to .github/styles/write-good/Illusions.yml diff --git a/styles/write-good/Passive.yml b/.github/styles/write-good/Passive.yml similarity index 100% rename from styles/write-good/Passive.yml rename to .github/styles/write-good/Passive.yml diff --git a/styles/write-good/README.md b/.github/styles/write-good/README.md similarity index 100% rename from styles/write-good/README.md rename to .github/styles/write-good/README.md diff --git a/styles/write-good/So.yml b/.github/styles/write-good/So.yml similarity index 100% rename from styles/write-good/So.yml rename to .github/styles/write-good/So.yml diff --git a/styles/write-good/ThereIs.yml b/.github/styles/write-good/ThereIs.yml similarity index 100% rename from styles/write-good/ThereIs.yml rename to .github/styles/write-good/ThereIs.yml diff --git a/styles/write-good/TooWordy.yml b/.github/styles/write-good/TooWordy.yml similarity index 100% rename from styles/write-good/TooWordy.yml rename to .github/styles/write-good/TooWordy.yml diff --git a/styles/write-good/Weasel.yml b/.github/styles/write-good/Weasel.yml similarity index 100% rename from styles/write-good/Weasel.yml rename to .github/styles/write-good/Weasel.yml diff --git a/styles/write-good/meta.json b/.github/styles/write-good/meta.json similarity index 100% rename from styles/write-good/meta.json rename to .github/styles/write-good/meta.json diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 7d9fce2f..b8a32857 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -11,6 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Run vale spell and style check + uses: errata-ai/vale-action@reviewdog + with: + files: docs + - uses: actions/setup-node@v3 with: node-version: 18 diff --git a/.vale.ini b/.vale.ini index dac66ab9..63112c6b 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,4 +1,4 @@ -StylesPath = styles +StylesPath = .github/styles Vocab=Docs From 9925d9f7d41ac33ae63ab5ea7bb78e1c3ce33ea9 Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 14:35:42 +0200 Subject: [PATCH 3/7] Spell/style check examples.md --- docs/examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index 4f91d205..20a3998c 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -7,7 +7,7 @@ description: "" # Examples Do you want to see Restate in action? -[Here](https://github.com/restatedev/examples) are some ready-to-run examples for you. +[Here](https://github.com/restatedev/examples) you find some ready-to-run examples. Pick an example from the list below and follow the instructions in the README to run it. ## Starter examples @@ -18,7 +18,7 @@ Pick an example from the list below and follow the instructions in the README to ## Intermediate examples - [Ticket reservation system](https://github.com/restatedev/examples/tree/main/typescript/ticket-reservation): a subset of a ticket booking system to illustrate how Restate's keyed-sharding and concurrency guarantees simplify microservice architectures. -- [Food ordering](https://github.com/restatedev/examples/tree/main/typescript/food-ordering): The order processing middleware of a fast food chain implemented with awakeables and delayed calls. +- [Food ordering](https://github.com/restatedev/examples/tree/main/typescript/food-ordering): The order processing app of a fast food chain implemented with Awakeables and delayed calls. ## Advanced examples From 83ccd552cd06af0312abcc6f1ab724411a0b8e5a Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 14:40:36 +0200 Subject: [PATCH 4/7] Spell/style check overview.md --- .github/styles/Vocab/Docs/accept.txt | 1 + docs/overview.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/styles/Vocab/Docs/accept.txt b/.github/styles/Vocab/Docs/accept.txt index 887e6f1d..48b35588 100644 --- a/.github/styles/Vocab/Docs/accept.txt +++ b/.github/styles/Vocab/Docs/accept.txt @@ -1,3 +1,4 @@ Restate AWS Awakeables +RPC diff --git a/docs/overview.md b/docs/overview.md index 9d70d40c..7fa2021b 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -7,7 +7,7 @@ slug: / description: "Documentation overview" ---
-

Welcome to the Restate Documentation!

+

Welcome to the Restate Documentation

Restate is a system for easily building resilient applications using distributed durable RPC & async/await.

@@ -22,7 +22,7 @@ Watch the intro video:
From e50ea3766f938c277cbdf0a8da97ba3d1f0b2ce2 Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 14:50:59 +0200 Subject: [PATCH 5/7] Spell/style check quickstart.mdx --- .github/styles/Vocab/Docs/accept.txt | 5 ++++- docs/quickstart.mdx | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/styles/Vocab/Docs/accept.txt b/.github/styles/Vocab/Docs/accept.txt index 48b35588..0754aed3 100644 --- a/.github/styles/Vocab/Docs/accept.txt +++ b/.github/styles/Vocab/Docs/accept.txt @@ -1,4 +1,7 @@ -Restate +(?i)Restate AWS Awakeables RPC +npm +npx +application/json diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index a4e95fff..2df71119 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; This guide takes you through your first steps with Restate. ## Prerequisites -- Latest stable version of [NodeJS](https://nodejs.org/en/) (>= v18.17.1) and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) (>= 9.8.0) +- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.8.0 - [Docker](https://docs.docker.com/engine/install/) ## Step 1: Create the Node app @@ -32,7 +32,7 @@ npm install && npm run build Now, you are all set to start developing your service in `src/app.ts`. ## Step 3: Build and Run the Greeter service -Once you are done with implementing your service, build the app and run it: +Once you have implemented your service, build the app and run it: ```shell npm run build npm run app @@ -84,7 +84,7 @@ Invoke the function via: curl -X POST http://localhost:9090/myservice/hello -H 'content-type: application/json' -d '{"request": "Pete"}' ``` -That's it! You managed to run your first Restate service. +Congratulations, you managed to run your first Restate service. ## Next steps From f5faaeed36c8b9a2af83faf5dec9a8cb1a118e13 Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 15:58:51 +0200 Subject: [PATCH 6/7] Spell/style check tour.mdx This fixes #142. --- .github/styles/Vocab/Docs/accept.txt | 15 ++ .vale.ini | 8 +- docs/tour.mdx | 226 +++++++++++++-------------- 3 files changed, 133 insertions(+), 116 deletions(-) diff --git a/.github/styles/Vocab/Docs/accept.txt b/.github/styles/Vocab/Docs/accept.txt index 0754aed3..222809f1 100644 --- a/.github/styles/Vocab/Docs/accept.txt +++ b/.github/styles/Vocab/Docs/accept.txt @@ -5,3 +5,18 @@ RPC npm npx application/json +application +Podman +sharded +(?i)Unkeyed +(?i)suspendable +enqueued +(?i)implement +serverless +UUID +uuid +idempotency +boolean +exactly-once +backoff +Jaeger diff --git a/.vale.ini b/.vale.ini index 63112c6b..60ddd4c9 100644 --- a/.vale.ini +++ b/.vale.ini @@ -6,8 +6,10 @@ MinAlertLevel = suggestion Packages = Google, proselint, write-good -[*.md] -BasedOnStyles = Vale, Google, proselint, write-good +# The "formats" section allows you to associate an "unknown" format +# with one of Vale's supported formats. +[formats] +mdx = md -[*.mdx] +[*.md] BasedOnStyles = Vale, Google, proselint, write-good diff --git a/docs/tour.mdx b/docs/tour.mdx index 6f71033f..57e1614d 100644 --- a/docs/tour.mdx +++ b/docs/tour.mdx @@ -15,8 +15,8 @@ After this tutorial, you should have a firm understanding of how Restate can hel This tutorial implements a ticket reservation application for a theatre. It allows users to add tickets for specific seats to their shopping cart. -After a ticket is added, the seat gets reserved for 15 minutes. -If it hasn't been bought and paid within that time interval, the reservation is released and the ticket becomes available to other users. +After the user adds a ticket, the seat gets reserved for 15 minutes. +If the user doesn't pay for the ticket within that time interval, the reservation is released and the ticket becomes available to other users. Restate is a system for building distributed applications. Applications consist of a set of services with RPC functions defined in them. @@ -30,13 +30,13 @@ The ticket example has three services, with the following functions: As we go, you will discover how Restate can help you with some intricacies in this application. ## Prerequisites -> 📝 As long as Restate hasn't been launched publicly, you need to have access to the private Restate npm packages and Docker container. Please follow the instructions in the [restate-dist](https://github.com/restatedev/restate-dist) Readme to set up access: +> 📝 As long as Restate hasn't been launched publicly, you need to have access to the private Restate npm packages and Docker container. Please follow the instructions in the [restate-dist/README](https://github.com/restatedev/restate-dist) to set up access: -- Latest stable version of [NodeJS](https://nodejs.org/en/) (>= v18.17.1) and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) (>= 9.8.0) installed. +- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.8.0 installed. - [Docker Engine](https://docs.docker.com/engine/install/) or [Podman](https://podman.io/docs/installation) to launch the Restate runtime (not needed for the app implementation itself). - [curl](https://everything.curl.dev/get) -This guide was written for: +This guide is written for: - Typescript SDK version: `@restatedev/restate-sdk:VAR::TYPESCRIPT_SDK_VERSION` - Restate runtime Docker image: `restate-dist:VAR::RESTATE_DIST_VERSION` @@ -48,7 +48,7 @@ Clone the GitHub repository of the [tutorial](https://github.com/restatedev/tour git clone --depth 1 --branch VAR::TOUR_VERSION git@github.com:restatedev/tour-of-restate-typescript.git ``` -This GitHub repository contains the basic skeleton of the NodeJS/Typescript services that we develop in this tutorial. +This GitHub repository contains the basic skeleton of the NodeJS/Typescript services that you develop in this tutorial. First, get all dependencies and build tools. Then build the app: ```shell @@ -81,7 +81,7 @@ docker run --name restate_dev --rm -d -p 8081:8081 -p 9091:9091 -p 9090:9090 -p You can consult the runtime logs via `docker logs restate_dev`. -When you are done with the tutorial, stop the runtime with `docker stop restate_dev`. This command also wipes the state (because we used the `--rm` flag). +When you are done with the tutorial, stop the runtime with `docker stop restate_dev`. This command also wipes the state (because you used the `--rm` flag). To do resilience experiments later on, you can restart the runtime (without losing state) with `docker restart restate_dev`. @@ -126,7 +126,7 @@ You should now see the registered services printed out to your terminal: ```
Show the runtime logs -When we look at the logs of the runtime we see: +When you look at the logs of the runtime you see: ``` 2023-08-15T13:24:52.879977Z INFO restate_schema_impl::schemas_impl @@ -158,7 +158,7 @@ Mimic adding a ticket to a cart, by calling `UserSession/addTicket` as follows: curl -X POST http://localhost:9090/UserSession/addTicket -H 'content-type: application/json' -d '{"key": "123", "request": "456"}' ``` -If this prints out `true`, then you have a working setup! +If this prints out `true`, then you have a working setup. You can call the `UserSession/checkout` function to proceed with the purchase, as follows: @@ -167,22 +167,23 @@ curl -X POST http://localhost:9090/UserSession/checkout -H 'content-type: applic ``` In `src/app`, you find the skeletons of the services where you can start implementing your app. -The `app.ts` file contains the definition of the Restate server that will serve the functions. +The `app.ts` file contains the definition of the Restate server that serves the functions. ## Services and concurrency -There are two types of Restate services: +Two types of Restate services exist: 1. **Keyed service**: All service invocations are sharded on a user-defined key. -There is at most one concurrent invocation per key. +Per key there is at most one concurrent invocation. 2. **Unkeyed service**: No key defined. -No concurrency guarantees or limitations. Invocations are processed as they come in. +No concurrency guarantees or limitations. +Invocations are processed as they come in. You would get the same behavior with a keyed service with random keys. ### Specifying the service type -An unkeyed service is specified by creating a router with its set of functions: +You specify an unkeyed service by creating a router with its set of functions: ```typescript const serviceRouter = restate.router({ @@ -197,9 +198,9 @@ The functions of an unkeyed router have two optional parameters: * A `ctx` of type `restate.RpcContext` which allows to interact with Restate. * A `request` of type JSON object which represents additional invocation data. -The parameter names be chosen differently. +You can choose the parameter names differently. -A keyed service is specified by creating a keyed router with its set of functions: +You specify a keyed service by creating a keyed router with its set of functions: ```typescript const keyedServiceRouter = restate.keyedRouter({ @@ -216,9 +217,9 @@ The functions of a keyed router have three optional parameters * A `key` parameter of type string which represents the key of the invoked service. * A `request` parameter of type JSON object which represents additional invocation data. -The parameter names may be chosen differently. +You can choose the parameter names differently. -In order to export the `service` API, you create a service API instance which specifies under which path the service is reachable: +You export the `service` API by creating a service API instance which specifies under which path the service is reachable: ```typescript export const serviceApi: restate.ServiceApi = { @@ -229,17 +230,17 @@ export const serviceApi: restate.ServiceApi = { :::tip The concurrency guarantees of keyed services makes it a lot easier to reason about interaction with external systems. -Imagine you have a keyed service that is the single writer to a database and every key only interacts with an isolated set of database rows. +Imagine you have a keyed service which is the single writer to a database and every key only interacts with an isolated set of database rows. Then you can scale your application and never have concurrent invocations writing to the same database row. This resolves common data consistency issues such as lost updates or non-repeatable reads. -Have a look at the product service of the [shopping cart example](https://github.com/restatedev/examples/tree/main/typescript/ecommerce-store). It's keyed on product ID, -just like the database table it writes to. Restate ensures that there are never concurrent writes to the same product. +Have a look at the product service of the [shopping cart example](https://github.com/restatedev/examples/tree/main/typescript/ecommerce-store). +The service is keyed on product ID, just like the database table it writes to. Restate ensures that there are never concurrent writes to the same product. ::: :::caution Take into account the concurrency limitations when designing your applications! -- Time-consuming operations in a keyed service (e.g. sleep) lock that key/service for the entire operation. +- Time-consuming operations in a keyed service, for example sleeps, lock that key/service for the entire operation. Other invocations for that key/service are enqueued, until the invocation has completed. - Deadlocks: Watch out for cyclical request-response calls in your application. For example, if A calls B, and B calls C, and C calls A again. @@ -250,11 +251,12 @@ The keys remain locked and the system can't process any more requests. ## Suspendable request-response calls :::note Implement it yourself or follow along by looking at the code under `src/part1`. ::: + One of the key parts of distributed applications is service-to-service communication. Restate makes sure that service-to-service communication is durable. Messages never get lost. -Let's begin with request-response calls, in which one service calls another service and waits for the response. +You begin with request-response calls, in which one service calls another service and waits for the response. When the `UserSession/addTicket` function is called, it first needs to reserve the ticket for the user. It does that by calling the `TicketService/reserve` function. @@ -276,8 +278,8 @@ const addTicket = async ( }; ``` -To do the call, we supply the exported `ticketServiceApi` to the RpcContext via the `rpc` function to specify which service to invoke. -Then we call the `reserve` function, which returns a Promise that gets resolved with the `boolean` response. +To do the call, you supply the exported `ticketServiceApi` to the RpcContext via the `rpc` function to specify which service to invoke. +Then you call the `reserve` function, which returns a Promise that gets resolved with the `boolean` response. Try it out by running the services via `npm run app` and send a request to `UserSession/addTicket`, as we did [previously](#running-the-services-and-runtime). @@ -299,17 +301,16 @@ Have a look at the SDK and runtime logs, to see how the ingress request triggers
-To better understand what is going on, we increased the log level by setting the environment variable `RESTATE_DEBUG_LOGGING=JOURNAL`. +To better understand what's going on, you can increase the log level by setting the environment variable `RESTATE_DEBUG_LOGGING=JOURNAL`. You can silence the logging by removing this environment variable in `package.json`, where the scripts are defined. To also log the messages, use `RESTATE_DEBUG_LOGGING=JOURNAL_VERBOSE`. ### What actually happened? -The call we just did, seems like a regular RPC call. -But under-the-hood, Restate does a number of things to make sure that this call is durable. +The call you just did, seems like a regular RPC call. +Under-the-hood Restate does a number of things to make sure that this call is durable. -The runtime persists the incoming request, establishes a connection to the user session service, -and sends the request over that connection. -All the communication between the runtime and the service, will go over this connection. +The runtime persists the incoming request, establishes a connection to the user session service, and sends the request over that connection. +All the communication between the runtime and the service, goes over this connection. The service itself never needs to set up the connection. The user session service then calls the ticket service. @@ -317,19 +318,17 @@ This request goes over the open connection to the runtime, that again durably lo The runtime takes care of request retries, in case of failures (covered later on in [Resiliency](#resiliency)). Finally, the runtime routes the response back to the user session service. -When services need to wait a long time (e.g. sleep an hour, or wait for a day on a response), -Restate suspends the function invocations to free up the resources for other invocations. +When services need to wait a long time, for example sleep an hour, or wait for a day on a response, Restate suspends the function invocations to free up the resources for other invocations. When the service can resume, Restate invokes the service again and sends over a replay log. The replay log contains the steps that the service already executed before it suspended. The service replays the log and continues processing at the point where it left off. :::tip -The suspension mechanism of Restate is especially beneficial if you run on serverless infrastructure (e.g. AWS Lambda). +The suspension mechanism of Restate is especially beneficial if you run on serverless infrastructure, for example AWS Lambda. For example, you can do request-response calls without paying for the idle time when waiting for a response. ::: -To see this work in practice, let's mimic the ticket service doing heavy processing -by adding a sleep call to the `TicketService/reserve` function: +To see this work in practice, you mimic the ticket service doing heavy processing by adding a sleep call to the `TicketService/reserve` function: ```typescript import { setTimeout } from "timers/promises"; @@ -343,12 +342,12 @@ const reserve = async (ctx: restate.RpcContext) => { ``` :::caution -This is not the proper way to sleep in a Restate application! +This isn't the proper way to sleep in a Restate application! The Restate SDK offers you a way to do sleeps that are suspendable, as covered [later on](#suspendable-sleep). ::: Call `UserSession/addTicket` again and have a look at the SDK logs. -Now that the ticket service responds after 35 seconds, we see that the `addTicket` function suspends after 30 seconds. +Now that the ticket service responds after 35 seconds, you see that the `addTicket` function suspends after 30 seconds. Once the runtime has received the response, it invokes the `addTicket` function again and the call finishes.
Show the logs @@ -379,8 +378,8 @@ Once the runtime has received the response, it invokes the `addTicket` function ### 📝 Try it out Make the `UserSession/checkout` function call the `Checkout/checkout` function. -For the request field, you can use a hardcoded string array for now: `["456"]`. -We will fix this later on. +For the request field, you can use a hard-coded string array for now: `["456"]`. +You will fix this later on. <>
Solution @@ -400,7 +399,7 @@ const checkout = async (ctx: restate.RpcContext, userId: string) => { }; ``` -Call the `UserSession/checkout` function as we did earlier and have a look at the logs again to see what happened: +Call the `UserSession/checkout` function as you did earlier and have a look at the logs again to see what happened: ```log [restate] [2023-08-15T21:06:12.672Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Invoking function. [restate] [2023-08-15T21:06:12.673Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Adding message to journal and sending to Restate ; InvokeEntryMessage @@ -413,16 +412,17 @@ Call the `UserSession/checkout` function as we did earlier and have a look at th [restate] [2023-08-15T21:06:12.679Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Function completed successfully. ``` -Notice that the `UserSession` did not get suspended because the response came before the suspension timeout hit. +Notice that the `UserSession` didn't get suspended because the response came before the suspension timeout hit.
## Reliable message sending without queues -Until now, we did request-response calls and waited for the response. -You can also do one-way calls via Restate, where you do not wait for the response. The syntax is very similar. -All we need to do is to use `RpcContext.send`, as we do here in the `UserSession/addTicket` function: +Until now, you did request-response calls and waited for the response. +You can also do one-way calls via Restate, where you don't wait for the response. +The syntax is similar. +All you need to do is to use `RpcContext.send`, as you do here in the `UserSession/addTicket` function: ```typescript const addTicket = async ( @@ -437,7 +437,7 @@ const addTicket = async ( }; ``` -Note that `RpcContext.send` is not an asynchronous operation which returns a promise. +Note that `RpcContext.send` isn't an asynchronous operation which returns a promise. Therefore, there is no need to await it. Once you adapted the code, try it out by calling the `UserSession/addTicket` function, as [explained earlier](#running-the-services-and-runtime). @@ -467,8 +467,8 @@ Restate retries failed one-way invocations for you. No need to set up any messag ### 📝 Try it out -In our example, when you add a seat to your shopping cart, it gets reserved for 15 minutes. -When a user did not proceed with the payment before the timeout, we need to call the `UserSession/expireTicket` function. +In your example, when you add a seat to your shopping cart, it gets reserved for 15 minutes. +When a user didn't proceed with the payment before the timeout, you need to call the `UserSession/expireTicket` function. Let the `expireTicket` function call the `TicketService/unreserve` function. When you are done with the implementation, send a request to `UserSession/expireTicket` to check if it works. @@ -518,13 +518,13 @@ Have a look at the logs again to see what happened: :::note Implement it yourself or follow along by looking at the code under `src/part2`. ::: -Restate suspends a function invocation when it's waiting on external input. +Restate suspends a function invocation when it waits on external input. The partial progress of the service invocation is durably stored in the log and can be resumed once the external input has arrived. Restate offers the same mechanism for timers. ### Suspendable sleep You can do a durable, suspendable sleep with the Typescript SDK. -Earlier in this tutorial, we showed how Restate suspensions work by letting the ticket service sleep: +Earlier in this tutorial, you explored how Restate suspensions work by letting the ticket service sleep: ```typescript const reserve = async (ctx: restate.RpcContext) => { //bad-code-start @@ -535,7 +535,7 @@ const reserve = async (ctx: restate.RpcContext) => { ``` ❗ This line of code would keep the service invocation running idly, and would not survive service restarts. -To use a durable, suspendable sleep, use the sleep functionality of the Restate SDK: +To use a durable, suspendable sleep, use the sleep feature of the Restate SDK: ```typescript const reserve = async (ctx: restate.RpcContext) => { //good-code-start @@ -545,9 +545,9 @@ const reserve = async (ctx: restate.RpcContext) => { }; ``` -Send an `addTicket` request, as [we did earlier](#running-the-services-and-runtime). +Send an `addTicket` request, as [you did earlier](#running-the-services-and-runtime). In the service logs, you can see the `reserve` function processing the sleep, then suspending, and then resuming again after the sleep completed. -The `addTicket` function did a one-way call to the `reserve` function so did not suspend but just finished its invocation. +The `addTicket` function did a one-way call to the `reserve` function so didn't suspend but just finished its invocation.
Show the logs @@ -573,7 +573,7 @@ The `addTicket` function did a one-way call to the `reserve` function so did not Revert the `reserve` function call to a request-response call, to see how the suspensions work across different services. -Simply replace the `RpcContext.send()` with `RpcContext.rpc()`, to end up with: +Replace the `RpcContext.send()` with `RpcContext.rpc()`, to end up with: ```ts const addTicket = async ( @@ -591,7 +591,7 @@ const addTicket = async ( Now you see in the logs that both services get suspended. The user session service gets suspended because it waits for a response from the `reserve` function and the ticket service gets suspended because it waits for the sleep to be completed. Restate keeps track of how long the service should sleep and then triggers it to resume the invocation. -Finally, we see the responses of both functions coming in. +Finally, you see the responses of both functions coming in.
Show the logs @@ -621,7 +621,7 @@ Finally, we see the responses of both functions coming in.
-When you reduce the time the `TicketService/reserve` function sleeps to a second, you will not see the suspensions anymore. +When you reduce the time the `TicketService/reserve` function sleeps to a second, you won't see the suspensions anymore. :::caution @@ -632,9 +632,9 @@ Sleeping blocks processing for keyed services (for that single key). ### Delayed calls -Let's have a look at a slightly different usage of timers. +Take a look at a slightly different usage of timers. In the application, a ticket gets reserved for 15 minutes. -If it hasn't been bought and paid within that time interval, then it becomes available again to other users. +If the user doesn't pay within that time interval, then it becomes available again to other users. To do this, you can use a delayed call. This is a one-way call that gets delayed by a specified duration. @@ -662,7 +662,7 @@ const addTicket = async ( }; ``` -To test it out, put the delay to a lower value (e.g. 5 seconds), call the `addTicket` function, and see in the logs how the call is executed 5 seconds later. +To test it out, put the delay to a lower value, for example 5 seconds, call the `addTicket` function, and see in the logs how the call is executed 5 seconds later.
Show the logs @@ -688,7 +688,7 @@ To test it out, put the delay to a lower value (e.g. 5 seconds), call the `addTi Don't forget to set the delay back to 15 minutes. :::caution -There are different ways to implement this pattern. +You can implement this pattern in different ways. You could also sleep for 15 minutes at the end of the `addTicket` function and then call the `TicketService/unreserve` function: ```typescript @@ -699,17 +699,17 @@ ctx.send(ticketServiceApi).unreserve({ }); ``` -Be aware that sleeping in a keyed service blocks any invocations for that key. So the user would not be able to add any other tickets, nor buy -the tickets. +Be aware that sleeping in a keyed service blocks any invocations for that key. +In this case, the user would not be able to add any other tickets, nor buy the tickets. If you do a sleep operation, the invocation is ongoing. -If you do a delayed call, the invocation is not ongoing until the delay has passed, so no key is locked. +If you do a delayed call, the invocation isn't ongoing until the delay has passed, so no key is locked. ::: ## Persistent application state -Applications often need to keep state. For example, our user session service +Applications often need to keep state. For example, your user session service needs to track the shopping cart items. Restate offers a key-value store to persistently store application state. @@ -723,11 +723,11 @@ The isolation level of the application state depends on the service type: 1. Keyed service: Application state is isolated per key. All the invocations for the same key have access to the same application state. Restate's state feature is most useful for this service type. -2. Unkeyed service: State is isolated per invocation. Using state is not useful +2. Unkeyed service: State is isolated per invocation. Using state isn't useful for this service type. -Let's adapt the `UserSession/addTicket` function to keep track of the cart items. -After successfully reserving the product, we add the ticket to the shopping cart. +Try to adapt the `UserSession/addTicket` function to keep track of the cart items. +After reserving the product, you add the ticket to the shopping cart. Have a look at the highlighted code: ```ts @@ -756,10 +756,10 @@ To retrieve the cart, the first highlighted line calls `await ctx.get(state_k This returns `null` if the value has never been set. You can store multiple key-value pairs, by using different state keys. -Here, we get the value under the key `"tickets"`. -Restate ensures that we get the cart belonging to the current user ID (key of the service). +Here, you get the value under the key `"tickets"`. +Restate ensures that you get the cart belonging to the current user ID (key of the service). -After we added the ticket to the cart array, the second highlighted line sets the state to the new value with `ctx.set(state_key: string, new_value: T)`. +After you added the ticket to the cart array, the second highlighted line sets the state to the new value with `ctx.set(state_key: string, new_value: T)`. Run the services and call the `addTicket` function, to see the interaction with state in the logs. @@ -776,9 +776,9 @@ Run the services and call the `addTicket` function, to see the interaction with
-We see that when we request the state, it gets logged in the journal. +You see that when you request the state, it gets logged in the journal. The state value gets immediately retrieved, because the invocation state is eagerly sent. -Finally, we set the new value. +Finally, you set the new value. Add a log statement to print the cart contents, and then call `addTicket` multiple times to see how the state gets updated: @@ -786,13 +786,13 @@ Add a log statement to print the cart contents, and then call `addTicket` multip console.info(`Current tickets: ${JSON.stringify(tickets)}`); ``` -You can also kill and relaunch the service or restart the runtime (`docker restart restate_dev`), to see that this has no influence on the tickets. +You can also stop and relaunch the service or restart the runtime (`docker restart restate_dev`), to see that this has no influence on the tickets. :::info You can store any object in the state as long as the value can be serialized with `Buffer.from(JSON.stringify(yourObject))`. ::: -Let's also adapt the `checkout` function in the user session service, to use the tickets: +Try to also adapt the `checkout` function in the user session service, to use the tickets: ```typescript const checkout = async (ctx: restate.RpcContext, userId: string) => { // 1. Retrieve the tickets from state @@ -830,10 +830,10 @@ Have a look at the logs to see how the code executes the workflow. ### 📝 Try it out #### Finishing `UserSession/expireTicket` -We almost fully implemented the user session service. -Now that we implemented the checkout function, we can also finalize the `UserSession/expireTicket`. +You almost fully implemented the user session service. +Now that you implemented the checkout function, you can also finish the `UserSession/expireTicket`. -At the moment we have the following code: +At the moment you have the following code: ```ts const expireTicket = async ( @@ -845,9 +845,9 @@ const expireTicket = async ( }; ``` -Before we call `unreserve`, we first need to check if the ticket is still hold by the user. +Before you call `unreserve`, you first need to check if the ticket is still hold by the user. Retrieve the state and check if the ticket ID is in there. -If this is the case, then we call `TicketService/unreserve` and remove it from the state. +If this is the case, then you call `TicketService/unreserve` and remove it from the state.
Solution @@ -874,14 +874,14 @@ const expireTicket = async ( #### Implementing the ticket service -Let's track the status of the tickets in the ticket service by storing it in the state. +You can track the status of the tickets in the ticket service by storing it in the state. 1. Implement the `TicketService/reserve` function. The function first retrieves the value for the `"status"` state key. If the value is set to `TicketStatus.Available`, then change it to `TicketStatus.Reserved"` and return `true` (reservation successful). -If the status is not set to `TicketStatus.Available`, then return `false`. -Remove the sleep that we used previously. +If the status isn't set to `TicketStatus.Available`, then return `false`. +Remove the sleep that you used before. <>
Solution @@ -900,13 +900,13 @@ const reserve = async (ctx: restate.RpcContext) => { }; ``` -Now, we can't reserve the same ticket multiple times anymore. +Now, you can't reserve the same ticket multiple times anymore. Call `addTicket` multiple times for the same ID. The first time it returns `true`, afterwards `false`.
2. Implement the `TicketService/unreserve` function. -The function should set the value of the `"status"` key to `TicketStatus.Available` if it is currently reserved. +The function should set the value of the `"status"` key to `TicketStatus.Available` if it's reserved. <>
Solution @@ -927,14 +927,14 @@ const unreserve = async (ctx: restate.RpcContext) => { Now, the ticket reservation status switches back to `TicketStatus.Available` when the delayed call triggers. Play around with reducing the delay of the `expireTicket` call in the `addTicket` function. -Try to reserve the same ticket ID multiple times, and see how you are able to reserve it again after the `unreserve` function was triggered. +Try to reserve the same ticket ID multiple times, and see how you are able to reserve it again after the `unreserve` function executed.
3. Implement the `TicketService/markAsSold` function. -The function should set the value of the `"status"` key to `TicketStatus.Sold` if it was reserved before. -If successful, the function shall return `true`. +The function should set the value of the `"status"` key to `TicketStatus.Sold` if it's reserved. +If successful, the function returns `true`. <> @@ -954,8 +954,8 @@ const markAsSold = async (ctx: restate.RpcContext) => { }; ``` -In the next section, we will implement the `Checkout/checkout` function that calls `markAsSold`. -This will tie the final parts together. +In the next section, you implement the `Checkout/checkout` function that calls `markAsSold`. +This ties the final parts together.
@@ -969,18 +969,18 @@ This will tie the final parts together. ::: Restate's replay mechanism makes applications resilient to failures. -But it also requires your code to be deterministic. +It requires your code to be deterministic. -If you need to execute a non-deterministic code snippet (e.g. generating a UUID or communicating to an external system) then you should wrap it in a side effect. +If you need to execute a non-deterministic code snippet, for example generating a UUID or communicating to an external system, then you should wrap it in a side effect. The side effect executes the supplied function and eagerly stores the return value in Restate. -Upon replay, the stored value gets inserted and the function does not get re-executed. +Upon replay, the stored value gets inserted and the function doesn't get re-executed. :::tip You can use a side effect to avoid re-execution during replay for any arbitrary piece of user code. -So also for a piece of time-consuming, deterministic user code. +This includes pieces of time-consuming, deterministic user code. ::: -Let's use a side effect in `Checkout/checkout` to create and store a UUID (with the [uuid library](https://www.npmjs.com/package/uuid)) or idempotency key: +Use a side effect in `Checkout/checkout` to create and store a UUID (with the [uuid library](https://www.npmjs.com/package/uuid)) or idempotency key: ```typescript import { v4 as uuid } from "uuid"; @@ -996,7 +996,7 @@ const checkout = async ( ``` The highlighted line of code wraps the creation of the UUID in a side effect with a string return type. -When the `checkout()` function gets re-executed upon replay, Restate will inject the stored value. +When the `checkout()` function gets re-executed upon replay, Restate injects the stored value. To experiment, you can add a log line and a sleep to see how the UUID gets replayed after the suspension: @@ -1050,8 +1050,8 @@ The `checkout` function triggers the payment via some external payment provider The payment client has two methods: - `get()` to create a new client, -- `call(idempotencyKey: string, amount: number)` to execute the payment for a certain idempotencyKey and total amount. -The payment provider makes sure that only one payment gets processed for a single idempotency key. +- `call(idempotencyKey: string, amount: number)` to execute the payment for a certain idempotency key and total amount. +The payment provider makes sure that exactly one payment gets processed for a single idempotency key. Create a new payment client in `CheckoutService/Checkout`. Assume every ticket costs 40 dollars. @@ -1079,7 +1079,7 @@ const checkout = async ( ``` Add some tickets to your cart and then call `UserSession/checkout`. -You should see logs similar to: +You should see similar logs: ```logs // ... UserSessionService/Checkout logs ... @@ -1100,12 +1100,12 @@ Payment call succeeded for idempotency key 923d1558-bf17-4c94-b027-4cfd778049fe You see the `UserSession` service retrieving the cart and calling the checkout service. The `Checkout` service then does a side effect, the payment, and another side effect. -Finally, the checkout success is propagated back to the `UserSession` service. +The checkout success is propagated back to the `UserSession` service.
#### Finishing the checkout workflow -Once this works, let's implement the rest of the checkout workflow: +Once this works, you implement the rest of the checkout workflow: - If the payment call was successful, then: - use the EmailClient in `src/aux/email_client.ts` to notify the users of the payment success. Prevent duplicate emails during retries by using a side effect. @@ -1190,11 +1190,11 @@ const checkout = async (ctx: restate.RpcContext, userId: string) => { As you have discovered throughout this tutorial, Restate makes your applications resilient out-of-the-box by: - Making sure messages can't get lost by durably storing all calls in the log. -No more queues needed for async calls. +No more queues needed for asynchronous calls. - Retrying failed invocations. No more retry logic required for inter-service communication. - Restoring partial progress of invocations, via its durable execution mechanism. -For example, if a service goes down due to an infrastructure failure, the ongoing invocations will resume at the point in the user code where they left off. +For example, if a service goes down due to an infrastructure failure, the ongoing invocations resume at the point in the user code where they left off. - Ensuring consistent application state with its key-value store. - Providing end-to-end exactly-once guarantees for incoming invocations. @@ -1204,8 +1204,8 @@ These features are switched on by default. No need to do anything. ### Side effect retries -If you do a side effect operation and the side effect fails, then it will be retried until it succeeds. -Let's observe this behavior by using the `paymendClient.failingCall` in `Checkout/checkout`: +If you do a side effect operation and the side effect fails, then it is retried until it succeeds. +You can observe this behavior by using the `paymendClient.failingCall` in `Checkout/checkout`: ```typescript const paymentClient = PaymentClient.get(); @@ -1215,8 +1215,8 @@ const success = await ctx.sideEffect(doPayment); //highlight-end ``` -We now call `paymentClient.failingCall` which fails 2 times before succeeding. -A failing side effect will be retried with an exponential backoff until it succeeds. +You now call `paymentClient.failingCall` which fails 2 times before succeeding. +A failing side effect is retried with an exponential backoff until it succeeds. Restate uses suspending sleeps for the wait time between retries. Have a look at the logs to see the retries. @@ -1332,11 +1332,11 @@ Have a look at the traces of the `checkout` call: ![Checkout call traces](/img/jaeger_checkout_traces_tour_handler.png) -You can see the calls that were done to Restate (e.g. invoke, sleep, one way call, get state, ...) and their timings. -If you expand one of the traces, you can see additional tags describing some metadata of the context call (e.g. invocation id, call arguments). +You can see the calls that were done to Restate, for example invoke, sleep, one way call, get state, etc., and their timings. +If you expand one of the traces, you can see tags describing some metadata of the context call, for example invocation id and call arguments. -You can use Jaeger's search functionality to find specific traces. +You can use Jaeger's search feature to find specific traces. For example, to find the traces of a specific invocation, you can enter the Restate invocation ID, which you can find in the logs, into the search field `Tags`: ``` restate.invocation.id="T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE" @@ -1359,7 +1359,7 @@ You reached the end of this tutorial! :::info 🚩 Have a look at the fully implemented app in `src/part4`, and run it with `npm run part4`. ::: -Let's recap what we covered: +Let's recap what you've covered: - reliable, suspendable request-response calls - one-way calls without the need for queues - suspensions for external communication @@ -1371,9 +1371,9 @@ Let's recap what we covered: - tracing with Jaeger ## Next steps -This tutorial did not cover anything related to deployment. -In this tutorial, we ran the services as long-running services in Docker containers. -But Restate services can run with minimal changes on AWS Lambda. +This tutorial didn't cover anything related to deployment. +In this tutorial, you ran the services as long-running services in Docker containers. +Restate services can run with minimal changes on AWS Lambda as well. Possible next step: - [Run the examples](/examples) From 27600cd097d1bdb7d2de4242a6bebba6821f482a Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Fri, 25 Aug 2023 18:33:51 +0200 Subject: [PATCH 7/7] Temporarily disable failure on vale check The problem seems to be that reviewdog fails because there are too many warnings and errors in our docs. --- .github/workflows/test-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index b8a32857..e720d394 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -12,6 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Run vale spell and style check + continue-on-error: true uses: errata-ai/vale-action@reviewdog with: files: docs