Skip to content

Commit

Permalink
[Hyperlint] Wrangler capitalization, update ignore scope, add smart q…
Browse files Browse the repository at this point in the history
…uote check (cloudflare#16802)

* [Hyperlint] Wrangler capitalization, update ignore scope, add smart quote check

* Update .vale.ini

Co-authored-by: Kian <[email protected]>

---------

Co-authored-by: Kian <[email protected]>
  • Loading branch information
kodster28 and KianNH authored Sep 16, 2024
1 parent 5cb88a1 commit aa83f72
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
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:
- "[‘’“”]"
2 changes: 1 addition & 1 deletion .github/styles/config/vocabularies/cloudflare/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Wi-Fi
WordPress
Worker
Workers
Wrangler
[wW]rangler
VMware
VPN
YubiKey
8 changes: 3 additions & 5 deletions .hyperlint/style_guide_test.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# This is a test

Bad link at [this page](/test/).
testing `worker-configuration.d.ts`.

Build a better internet.
Then also, ‘this thing'

Testing [this page](https://developers.cloudflare.com/test/).

Going to [the marketing site](https://www.cloudflare.com)
What about wrangler or Wrangler.
4 changes: 2 additions & 2 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ yml = yaml
mdx = md

[*]
# Ignore code surrounded by backticks or plus sign, URLs, parameters defaults, and angle brackets.
TokenIgnores = (<\/?[A-Z].+>), (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[), (https[^\n]+\[), ([^\n]+@[^\n]+\.[^\n])
# Ignore code surrounded by plus sign, URLs, parameters defaults, and angle brackets.
TokenIgnores = (<\/?[A-Z].+>), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[), (https[^\n]+\[), ([^\n]+@[^\n]+\.[^\n])

[*.md]
BasedOnStyles = Vale, cloudflare
Expand Down

0 comments on commit aa83f72

Please sign in to comment.