diff --git a/.github/workflows/vale-docs-linter.yml b/.github/workflows/vale-docs-linter.yml index f60909e..3e2aedb 100644 --- a/.github/workflows/vale-docs-linter.yml +++ b/.github/workflows/vale-docs-linter.yml @@ -18,7 +18,8 @@ jobs: with: fetch_depth: 2 files: | - src/content/**/*.{md,mdx} + **/*.{md,mdx} + *.{md,mdx} # run reviewdog and the linter - name: run reviewdog and linter diff --git a/.vale.ini b/.vale.ini index 38b4323..a7945fc 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,3 +1,7 @@ +# styles/Fly and the fly-terms vocabulary are Fly's own and live here. The +# three public packages are fetched by `vale sync`, pinned to the releases +# below so a new upstream version cannot start enforcing rules we have not +# looked at. superfly/docs uses the same pins. StylesPath = styles Vocab = fly-terms @@ -6,9 +10,9 @@ MinAlertLevel = suggestion SkippedScopes = script -Packages = proselint, write-good, Google +Packages = https://github.com/vale-cli/Google/releases/download/v0.6.3/Google.zip, https://github.com/vale-cli/proselint/releases/download/v0.3.4/proselint.zip, https://github.com/vale-cli/write-good/releases/download/v0.4.1/write-good.zip -[src/content/**/*.{mdx,md}] +[*.{md,mdx}] BasedOnStyles = Fly, Google, proselint, Vale, write-good # Fly rules that we can turn back on when other things get cleaned up @@ -18,6 +22,7 @@ Fly.Latin = NO Fly.Machine = NO # we can do an initial search and replace and then this rule will be less noisy and more useful Fly.OxfordComma = NO Fly.SentenceLength = NO # turn on later; then reduce further? +Fly.Spelling = NO # off until the vocabulary covers these pages: 41 terms, all legitimate (Herdr, zsh, worktree, systemd) Fly.Us = NO # other style stuff turned off temporarily diff --git a/styles/Fly/Exclamation.yml b/styles/Fly/Exclamation.yml new file mode 100644 index 0000000..546bf95 --- /dev/null +++ b/styles/Fly/Exclamation.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use exclamation points sparingly." +nonword: true +level: suggestion +action: + name: remove +tokens: + - '\w+!(?:\s|$)' diff --git a/styles/Fly/Headings.yml b/styles/Fly/Headings.yml new file mode 100644 index 0000000..3d32dee --- /dev/null +++ b/styles/Fly/Headings.yml @@ -0,0 +1,28 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +level: suggestion +scope: heading +match: $sentence +indicators: + - ':' +exceptions: + - CLI + - Docker + - Elixir + - Fly + - Fly Proxy + - gRPC + - I + - Kubernetes + - Linux + - Machine + - Machines + - macOS + - MongoDB + - Nomad + - Rails + - Ruby + - REPL + - TypeScript + - URLs + - Windows \ No newline at end of file diff --git a/styles/Fly/Latin.yml b/styles/Fly/Latin.yml new file mode 100644 index 0000000..8b88c61 --- /dev/null +++ b/styles/Fly/Latin.yml @@ -0,0 +1,13 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +ignorecase: true +level: suggestion +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)(?=[\s,;])': for example + '\b(?:ie|i\.e\.)(?=[\s,;])': that is + '\b(?:viz\.)[\s,]': namely + '\b(?:ergo)[\s,]': therefore + diff --git a/styles/Fly/Machine.yml b/styles/Fly/Machine.yml new file mode 100644 index 0000000..de846e6 --- /dev/null +++ b/styles/Fly/Machine.yml @@ -0,0 +1,12 @@ + # This file tests some combinations of matches to try to avoid errors on proper usage. +extends: substitution + +message: "Use '%s' instead of '%s'." + +level: suggestion + +swap: + '(?