diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..334dd62 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,10 @@ +StylesPath = styles + +Vocab = DigitalOcean, Technical + +[*.md] +# Vale enforces Vocab. DigitalOcean is global DO style. +BasedOnStyles = Vale, DigitalOcean, PDocs + +# Superceded by DigitalOcean.Spelling +Vale.Spelling = NO diff --git a/README.md b/README.md index 0c1dd3e..a31bc5d 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,15 @@ This repository contains a [Vale-compatible](https://vale.sh/) implementation of To get started, add the package to your configuration file (as shown below) and then run `vale sync`. ```ini -StylesPath = styles -MinAlertLevel = suggestion - -Packages = DigitalOcean - -[*] -BasedOnStyles = Vale, DigitalOcean +StylesPath = styles # Use your normal style path here. +Packages = https://github.com/digitalocean/vale-package/releases/latest/download/DigitalOcean.zip ``` See [Vale's documentation on packages](https://vale.sh/docs/topics/packages/) for more information. + +## Included Components + +* The `DigitalOcean` style implements the universal DigitalOcean style guide. +* The `PDocs` style implements the DigitalOcean Product Docs style guide. +* The `DigitalOcean` vocab implements DigitalOcean-specific terminology. +* The `Technical` vocab implements more general technical terminology. diff --git a/styles/DigitalOcean/AMPM.yml b/styles/DigitalOcean/AMPM.yml new file mode 100644 index 0000000..11a359c --- /dev/null +++ b/styles/DigitalOcean/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: Use 'AM' or 'PM' preceded by a space to denote times. +link: https://docs.digitalocean.com/style/digitalocean/language/dates-and-times +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/styles/DigitalOcean/Acronyms.yml b/styles/DigitalOcean/Acronyms.yml new file mode 100644 index 0000000..67b5489 --- /dev/null +++ b/styles/DigitalOcean/Acronyms.yml @@ -0,0 +1,28 @@ +extends: conditional +message: "'%s' has no definition." +link: https://docs.digitalocean.com/style/digitalocean/language/acronyms +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 + - CLI + - CPU + - FAQ + - GPU + - HTML + - HTTP + - HTTPS + - JSON + - PDF + - PHP + - RAM + - SSH + - SQL + - URL + - USB + - YAML + - ZIP diff --git a/styles/DigitalOcean/CaseSensitiveSpellingSuggestions.yml b/styles/DigitalOcean/CaseSensitiveSpellingSuggestions.yml new file mode 100644 index 0000000..61391c4 --- /dev/null +++ b/styles/DigitalOcean/CaseSensitiveSpellingSuggestions.yml @@ -0,0 +1,14 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +ignorecase: false +level: error +action: + name: replace +swap: + "[Ii]ngress.NGINX": Ingress-NGINX + ".ngress.[Nn]ginx": Ingress-NGINX + "[Nn]ginx [Ii]ngress [Cc]ontroller": NGINX Ingress Controller + "NGINX ingress [Cc]ontroller": NGINX Ingress Controller + "NGINX [Ii]ngress controller": NGINX Ingress Controller + "(?