Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .hyperlint/.vale.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
StylesPath = ../.github/styles
StylesPath = ./automations/styles
MinAlertLevel = suggestion
IgnoredScopes = code, tt, img
SkippedScopes = script, style, pre, figure, code
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: gitlab_base.EOLWhitespace
description: |
Checks that there is no useless whitespace at the end of lines.
extends: existence
message: "Remove whitespace characters from the end of the line."
link: https://docs.gitlab.com/development/documentation/styleguide/
vocab: false
level: warning
scope: raw
raw:
- ' +\n'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: existence
message: "Don't use exclamation points in text."
link: "https://developers.google.com/style/exclamation-points"
nonword: true
level: error
action:
name: edit
params:
- trim_right
- "!"
tokens:
- '\w+!(?:\s|$)'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: gitlab_base.HeadingLink
description: |
Do not include links in a heading.
Headings already have self-referencing anchor links,
and they're used for generating the table of contents.
Adding a link will break the anchor linking behavior.
extends: existence
message: "Do not use links in headings."
vocab: false
level: error
ignorecase: true
nonword: true
link: https://docs.gitlab.com/development/documentation/styleguide/#links
scope: raw
tokens:
- ^#+ .*\[.+\]\(\S+\).*$
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: existence
message: "Don't use end punctuation in headings."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods
nonword: true
level: warning
scope: heading
action:
name: edit
params:
- trim_right
- ".?!"
tokens:
- "[a-z][.?!]$"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
extends: capitalization
message: "'%s' should use sentence-style capitalization."
link: https://docs.microsoft.com/en-us/style-guide/capitalization
level: suggestion
scope: heading
match: $sentence
indicators:
- ":"
exceptions:
- Azure
- CLI
- Code
- Cosmos
- Docker
- Emmet
- I
- Kubernetes
- Linux
- macOS
- Marketplace
- MongoDB
- REPL
- Studio
- TypeScript
- URLs
- Visual
- VS
- Windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# Warning: cloudflare.NonStandardQuotes
#
# Use only standard single and double quotes, not left or right quotes.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "Use standard single quotes or double quotes only. Do not use left or right quotes."
level: warning
ignorecase: true
link: https://developers.cloudflare.com/style-guide/grammar/punctuation-marks-and-symbols/quotation-marks/
scope: raw
raw:
- "[‘’“”]"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: gitlab_base.UnclearAntecedent
description: |
Checks for words that need a noun for clarity.
extends: existence
message: "Instead of '%s', try starting this sentence with a specific subject and verb."
link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#this-these-that-those
vocab: false
level: warning
ignorecase: false
tokens:
- "That is"
- "That was"
- "There are"
- "There were"
- "These are"
- "These were"
- "This is"
- "This was"
- "Those are"
- "Those were"
57 changes: 57 additions & 0 deletions .hyperlint/automations/styles/cloudflare/Contractions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
# Error: cloudflare.Contractions
#
# Do not use contractions.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/

extends: substitution
message: "Use '%s' instead of '%s'."
link: https://developers.cloudflare.com/style-guide/grammar/parts-of-speech/contractions/
level: error
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
'it''s(?=\.)': it is

should not: shouldn't

"that is(?![.,])": that's
'that''s(?=\.)': that is

'they are(?!\.)': they're
'they''re(?=\.)': they are

was not: wasn't

'we are(?!\.)': we're
'we''re(?=\.)': we are

'we have(?!\.)': we've
'we''ve(?=\.)': we have

were not: weren't

'what is(?!\.)': what's
'what''s(?=\.)': what is

'when is(?!\.)': when's
'when''s(?=\.)': when is

'where is(?!\.)': where's
'where''s(?=\.)': where is

will not: won't
22 changes: 22 additions & 0 deletions .hyperlint/automations/styles/cloudflare/InclusiveLanguage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# Warning: cloudflare.InclusiveLanguage
#
# Suggests alternatives for words that are culturally inappropriate.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/

extends: substitution
message: "**Warning**: Use inclusive language. Consider '%s' instead of '%s'."
level: warning
ignorecase: true
swap:
blacklist(?:ed|ing|s)?: denylist
whitelist(?:ed|ing|s)?: allowlist
master: primary, main
slave: secondary
he: they
his: their
she: they
hers: their
sanity (?:check|test): check for completeness
dummy: placeholder, sample, fake
17 changes: 17 additions & 0 deletions .hyperlint/automations/styles/cloudflare/LatinTerms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# Warning: cloudflare.LatinTerms
#
# Checks for use of Latin terms.
# Uses https://github.com/errata-ai/Google/blob/master/Google/Latin.yml for ideas.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/

extends: substitution
message: "Use '%s' instead of '%s', but consider rewriting the sentence."
link: https://developers.cloudflare.com/style-guide/grammar/parts-of-speech/abbreviations/#ie-vs-eg
level: warning
nonword: true
ignorecase: true
swap:
'\b(?:e\.?g[\s.,;:])': for example
'\b(?:i\.?e[\s.,;:])': that is
15 changes: 15 additions & 0 deletions .hyperlint/automations/styles/cloudflare/LinkChecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# Warning: cloudflare.LinkChecks
#
# Checks for the presence of semantically unhelpful words in link text.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "**Warning**: When referring to another page in our docs, use the full relative link (`/1.1.1.1/check/`) instead of the full URL (`https://developers.cloudflare.com/1.1.1.1/check/`) or a local development link (`http://localhost:1111/1.1.1.1/check/`)."
level: warning
ignorecase: true
scope: raw
nonword: true
tokens:
- \[.*\]\(https?:\/\/developers\.cloudflare\.com\/.+\)
- \[.*\]\(https?:\/\/localhost:1111\/.*?\)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# Warning: cloudflare.MeaningfulLinkWords
#
# Checks for the presence of semantically unhelpful words in link text.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
message: "**Warning**: Rewrite the link text for `%s` to be more descriptive. For more information, refer to [Descriptive link text](https://developers.cloudflare.com/style-guide/formatting/structure/links/#descriptive-link-text)."
level: warning
ignorecase: true
scope: raw
nonword: true
tokens:
- \[here\]\(.*\)
- \[this page\]\(.*\)
- \[read more\]\(.*\)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Error: cloudflare.MergeConflictMarkers
#
# Checks for existence of merge conflict markers that were accidentally committed as changes.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/

extends: existence
message: "Merge conflict marker '%s' found. [Address the merge conflict](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts) before merging."
level: error
scope: raw
raw:
- '\n<<<<<<< .+\n|\n=======\n|\n>>>>>>> .+\n'
12 changes: 12 additions & 0 deletions .hyperlint/automations/styles/cloudflare/Repetition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Error: cloudflare.Repetition
#
# Checks for duplicate words, like `the the` or `and and`.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: repetition
message: "**Warning**: Remove this duplicate word: '%s'."
level: warning
alpha: true
tokens:
- '[^\s]+'
Loading