Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
57 changes: 57 additions & 0 deletions .github/styles/cloudflare/Contractions.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodster28 - This check seems to be promoting the use of contractions, from the warnings I'm getting through my local Vale extension (in VS Code).
image

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
12 changes: 12 additions & 0 deletions .github/styles/cloudflare/EOLWhitespace.yml
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'
12 changes: 12 additions & 0 deletions .github/styles/cloudflare/ExclamationMarks.yml
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|$)'
17 changes: 17 additions & 0 deletions .github/styles/cloudflare/HeadingLinks.yml
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+\).*$
13 changes: 13 additions & 0 deletions .github/styles/cloudflare/HeadingPunctuation.yml
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][.?!]$"
28 changes: 28 additions & 0 deletions .github/styles/cloudflare/HeadingsSentenceCase.yml
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
14 changes: 14 additions & 0 deletions .github/styles/cloudflare/NonStandardQuotes.yml
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:
- "[‘’“”]"
21 changes: 21 additions & 0 deletions .github/styles/cloudflare/UnclearAntecedent.yml
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"
2 changes: 1 addition & 1 deletion .hyperlint/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ reviewer:
check_status_upon_review_failure: neutral
enabled: true
limit_num_reviews: 2
limit_num_comments: 7
limit_num_comments: 5
1 change: 0 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ StylesPath = .github/styles
MinAlertLevel = suggestion
IgnoredScopes = code, tt, img
SkippedScopes = script, style, pre, figure, code
Vocab = cloudflare

[formats]
yml = yaml
Expand Down