diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000000..d1608a3636 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,10 @@ +StylesPath = .vale/styles +MinAlertLevel = suggestion + +Vocab = word_list + +[*.md] +BasedOnStyles = style_guide + +#style_guide.Headings = NO +#style_guide.HeadingPunctuation = NO diff --git a/.vale/styles/Vocab/word_list/accept.txt b/.vale/styles/Vocab/word_list/accept.txt new file mode 100644 index 0000000000..47197672ff --- /dev/null +++ b/.vale/styles/Vocab/word_list/accept.txt @@ -0,0 +1,67 @@ +Meilisearch +[Ss]ubroute +[Ss]ubstring +uid +jq +Qovery +Koyeb +Vue +[Gg]eosearch +Nginx +Docxtemplater +[Cc]onfig +Algolia +Typesense +Symfony +Laravel +Strapi +[Ss]chemaless +[Rr]eindexed +chatbox +Lucene +Levenshtein +Swiftype +[Tt]okenizer +[Tt]okenization +[Aa]sync +[Ee]nqueued +[Ff]ilepath +[Ww]ebshop +boolean +Taj +Mahal +[Cc]ertbot +[Tt]oolchain +Jieba +Lindera +Netlify +[Oo]verconsumption +[Gg]eopositioning +hanzi +[Aa]utobatching +[Ii]mpactful +[Ll]owercased +[Mm]ultitenancy +[Rr]ulesets +[Pp]repended +[Aa]nonymized +[Ss]erverless +[Aa]utoscaling +[Hh]ostname +Scaleway +cron +mkcert +[Uu]pvote +Docsearch +[Oo]rderable +[Pp]erformant +Nutch +[Ss]ubproject +Doofinder +'/\(\B(.*?)\)' +[Ss]harding +[Mm]eili +jsonlines +Biutiful +Gb +docs-searchbar.js diff --git a/.vale/styles/Vocab/word_list/reject.txt b/.vale/styles/Vocab/word_list/reject.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.vale/styles/style_guide/FirstPerson.yml b/.vale/styles/style_guide/FirstPerson.yml new file mode 100644 index 0000000000..27bda04b1e --- /dev/null +++ b/.vale/styles/style_guide/FirstPerson.yml @@ -0,0 +1,17 @@ +--- +# Suggestion: style_guide.FirstPerson + +# We want to avoid using singular first person pronouns +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +ignorecase: true +level: suggestion +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/.vale/styles/style_guide/HeadingPunctuation.yml b/.vale/styles/style_guide/HeadingPunctuation.yml new file mode 100644 index 0000000000..801dc493cf --- /dev/null +++ b/.vale/styles/style_guide/HeadingPunctuation.yml @@ -0,0 +1,12 @@ +--- +# Suggestion: style_guide.HeadingPunctuation.yml + +# Need to update this for "1. Click this" "1.1. Click that" +# Our headings should not use end punctuation +extends: existence +message: "Don't use end punctuation in headings." +link: https://developers.google.com/style/periods +level: suggestion +scope: heading +tokens: + - '[a-z0-9][.?!](?:\s|$)' diff --git a/.vale/styles/style_guide/Headings.yml b/.vale/styles/style_guide/Headings.yml new file mode 100644 index 0000000000..7bb9268e6f --- /dev/null +++ b/.vale/styles/style_guide/Headings.yml @@ -0,0 +1,51 @@ +--- +# Suggestion: style_guide.Headings.yml + +# Our headings should use sentence-style capitalization. The exceptions include any headings that maybe a list, start with "Step 1: Do this", and the list of words below +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +level: suggestion +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - Azure + - CLI + - Code + - Docker + - SDK + - SDKs + - Kubernetes + - Linux + - macOS + - Marketplace + - MongoDB + - TypeScript + - URLs + - Visual + - VS + - Windows + - Meilisearch + - AWS + - Amazon Web Services + - DigitalOcean + - GCP + - Qovery + - GCP + - Google Cloud Platform + - Compute Engine + - GitHub + - JSON + - API + - VuePress + - OpenAPI + - Elasticsearch + - Algolia + - DevOps + - Lucene-Solr + - App Service Auto-Scale + - Certbot + - Bleve & Tantivy + - '([0-9a-z]:\s[A-Z])' #How do get this to throw an error for `Step 1: do this`? diff --git a/.vale/styles/style_guide/Meilisearch.yml b/.vale/styles/style_guide/Meilisearch.yml new file mode 100644 index 0000000000..c503268626 --- /dev/null +++ b/.vale/styles/style_guide/Meilisearch.yml @@ -0,0 +1,11 @@ +--- +# Error: style_guide.Meilisearch.yml + +# Lists any possible typos for Meilisearch +extends: substitution +message: "Use '%s' instead of '%s'." +level: error +swap: + MeiliSearch: Meilisearch + MieliSearch: Meilisearch + meiliSearch: Meilisearch diff --git a/.vale/styles/style_guide/MergeConflictMarkers.yml b/.vale/styles/style_guide/MergeConflictMarkers.yml new file mode 100644 index 0000000000..9be66ed5de --- /dev/null +++ b/.vale/styles/style_guide/MergeConflictMarkers.yml @@ -0,0 +1,12 @@ +--- +# Error: style_guide.MergeConflictMarkers.yml + +# Checks for the presence of merge conflict markers. +extends: existence +message: 'Merge conflict marker "%s" found.' +link: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request +level: error +scope: raw +raw: + - '\n<<<<<<< .+\n|\n=======\n|\n>>>>>>> .+\n' + \ No newline at end of file diff --git a/.vale/styles/style_guide/OxfordComma.yml b/.vale/styles/style_guide/OxfordComma.yml new file mode 100644 index 0000000000..06b546e797 --- /dev/null +++ b/.vale/styles/style_guide/OxfordComma.yml @@ -0,0 +1,11 @@ +--- +# Suggestion: style_guide.OxfordComma.yml + +# Use the Oxford comma, this may not work as intended for complex sentences with many commas +extends: existence +message: "Use the Oxford comma in '%s'." +link: 'https://developers.google.com/style/commas' +scope: sentence +level: suggestion +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.vale/styles/style_guide/Periods.yml b/.vale/styles/style_guide/Periods.yml new file mode 100644 index 0000000000..adb58099fa --- /dev/null +++ b/.vale/styles/style_guide/Periods.yml @@ -0,0 +1,12 @@ +--- +# Suggestion: style_guide.Period.yml + +# Don't use periods with acronyms. "H.T.M.L" is incorrect, HTML isn't + +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/.vale/styles/style_guide/Repetition.yml b/.vale/styles/style_guide/Repetition.yml new file mode 100644 index 0000000000..e1e1f4a6fe --- /dev/null +++ b/.vale/styles/style_guide/Repetition.yml @@ -0,0 +1,10 @@ +--- +# Error: style_guide.Repetition.yml + +# catch any instances of repeated words. E.g., "This is is a sentence" +extends: repetition +message: "'%s' is repeated." +level: error +alpha: true +tokens: + - '[^\s]+' \ No newline at end of file diff --git a/.vale/styles/style_guide/Semicolons.yml b/.vale/styles/style_guide/Semicolons.yml new file mode 100644 index 0000000000..87ac43e56d --- /dev/null +++ b/.vale/styles/style_guide/Semicolons.yml @@ -0,0 +1,12 @@ +--- +# Suggestion: style_guide.Semicolons.yml + +# If your sentence uses a semicolon, you should break it into two sentences or rewrite it to avoid super long sentences. +extends: existence +message: "Use semicolons judiciously." +link: 'https://developers.google.com/style/semicolons' +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/.vale/styles/style_guide/Spacing.yml b/.vale/styles/style_guide/Spacing.yml new file mode 100644 index 0000000000..536ac01d9f --- /dev/null +++ b/.vale/styles/style_guide/Spacing.yml @@ -0,0 +1,15 @@ +--- +# Error: style_guide.Spacing.yml + +# Use a space between words, sentences, and punctuation marks +extends: existence +message: "'%s' should have one space." +link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods +level: error +nonword: true +tokens: + - '[a-z]\s{2,}[a-z]' # ensure only one space between words + - '[a-z][.?!:;",] {2,}[A-Z]' # one space between sentences (end. new) + - '[a-z][.?!:;",][A-Z]' #(end.new) + - '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' #only one space after ,.? + \ No newline at end of file diff --git a/.vale/styles/style_guide/Spelling.yml b/.vale/styles/style_guide/Spelling.yml new file mode 100644 index 0000000000..f90e38fadd --- /dev/null +++ b/.vale/styles/style_guide/Spelling.yml @@ -0,0 +1,9 @@ +--- +# Warning: style_guide.Spelling.yml + +# Checks if your words exist in the dictionary. Any exceptions (including Meilisearch) should be defined in `styles/Vocab/word_list/accept.txt` +extends: spelling +message: "Did you really mean '%s'?" +level: warning +filters: + - 'Vale.*\b' diff --git a/.vale/styles/style_guide/URLFormat.yml b/.vale/styles/style_guide/URLFormat.yml new file mode 100644 index 0000000000..151dd16062 --- /dev/null +++ b/.vale/styles/style_guide/URLFormat.yml @@ -0,0 +1,14 @@ +--- +# Warning: style_guide.URLFormat.yml + +# Use "a URL"/"an HTML" instead of "an URL"/"a HTML" +extends: substitution +message: "Use '%s' instead of '%s'." +ignorecase: true +level: warning +action: + name: replace +swap: + URL for: URL of + an URL: a URL + a HTML: an HTML