From 007e0a26c4d6951792b5443f3b9d775bcc27fd7b Mon Sep 17 00:00:00 2001 From: Kody Jackson Date: Thu, 8 May 2025 14:31:06 -0500 Subject: [PATCH] Rework hyperlint checks to plain text (#22304) * partial * Tweaks * update --- .hyperlint/.vale.ini | 18 +- .../cloudflare-automation/EOLWhitespace.yml | 12 - .../ExclamationMarks.yml | 12 - .../cloudflare-automation/HeadingLinks.yml | 15 - .../HeadingPunctuation.yml | 13 - .../NonStandardQuotes.yml | 14 - .../UnclearAntecedent.yml | 21 - .../styles/cloudflare/spelling-exceptions.txt | 382 ------------------ .../casing.md} | 9 +- .../plain-text-style-checks/eolwhitespace.md | 1 + .../exclamation-marks.md | 1 + .../plain-text-style-checks/heading-links.md | 3 + .../heading-punctuation.md | 3 + .../nonstandard-quotes.md | 3 + .../unclear-antecedent.md | 14 + 15 files changed, 35 insertions(+), 486 deletions(-) delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/EOLWhitespace.yml delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/ExclamationMarks.yml delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/HeadingLinks.yml delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/HeadingPunctuation.yml delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/NonStandardQuotes.yml delete mode 100644 .hyperlint/automations/styles/cloudflare-automation/UnclearAntecedent.yml delete mode 100644 .hyperlint/automations/styles/cloudflare/spelling-exceptions.txt rename .hyperlint/automations/styles/{config/vocabularies/cloudflare/accept.txt => plain-text-style-checks/casing.md} (63%) create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/eolwhitespace.md create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/exclamation-marks.md create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/heading-links.md create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/heading-punctuation.md create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/nonstandard-quotes.md create mode 100644 .hyperlint/automations/styles/plain-text-style-checks/unclear-antecedent.md diff --git a/.hyperlint/.vale.ini b/.hyperlint/.vale.ini index a178c32412..45455fff2a 100644 --- a/.hyperlint/.vale.ini +++ b/.hyperlint/.vale.ini @@ -1,19 +1,15 @@ StylesPath = automations/styles MinAlertLevel = suggestion -IgnoredScopes = code, tt, img -SkippedScopes = script, style, pre, figure, code +CommentDelimiters = {/*, */} [formats] mdx = md -[*] -# 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]) - -[src/content/docs/fundamentals/*] -BasedOnStyles = Vale, cloudflare, cloudflare-automation +[*/content/{docs,partials}/*.md] +BasedOnStyles = Vale, cloudflare Vale.Spelling = NO -[src/content/partials/fundamentals/*] -BasedOnStyles = Vale, cloudflare, cloudflare-automation -Vale.Spelling = NO \ No newline at end of file +[src/content/{docs,partials}/{agents,autorag,email-routing,pipelines,pub-sub,queues,realtime,support,workflows}/*] +BasedOnStyles = Vale +Vale.Spelling = NO +Vale.Terms = NO \ No newline at end of file diff --git a/.hyperlint/automations/styles/cloudflare-automation/EOLWhitespace.yml b/.hyperlint/automations/styles/cloudflare-automation/EOLWhitespace.yml deleted file mode 100644 index 2c2fccebb1..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/EOLWhitespace.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -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. Only remove the whitespace and nothing else." -link: https://docs.gitlab.com/development/documentation/styleguide/ -vocab: false -level: warning -scope: raw -raw: - - ' +\n' diff --git a/.hyperlint/automations/styles/cloudflare-automation/ExclamationMarks.yml b/.hyperlint/automations/styles/cloudflare-automation/ExclamationMarks.yml deleted file mode 100644 index 8e02d5b312..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/ExclamationMarks.yml +++ /dev/null @@ -1,12 +0,0 @@ -extends: existence -message: "Do not use exclamation points in text. Only replace the exclamation point and no other text." -link: "https://developers.google.com/style/exclamation-points" -nonword: true -level: error -action: - name: edit - params: - - trim_right - - "!" -tokens: - - '\w+!(?:\s|$)' diff --git a/.hyperlint/automations/styles/cloudflare-automation/HeadingLinks.yml b/.hyperlint/automations/styles/cloudflare-automation/HeadingLinks.yml deleted file mode 100644 index 822a8429a8..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/HeadingLinks.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: gitlab_base.HeadingLink -description: | - Do not include links in a heading. - Headings already have self-referencing anchor links. -extends: existence -message: "Do not use links in headings. Only update the links and nothing else." -vocab: false -level: error -ignorecase: true -nonword: true -link: https://docs.gitlab.com/development/documentation/styleguide/#links -scope: raw -tokens: - - ^#+ .*\[.+\]\(\S+\).*$ diff --git a/.hyperlint/automations/styles/cloudflare-automation/HeadingPunctuation.yml b/.hyperlint/automations/styles/cloudflare-automation/HeadingPunctuation.yml deleted file mode 100644 index 6bac39fec7..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/HeadingPunctuation.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Don't use end punctuation in headings. Only update the punctuation and nothing else." -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][.?!]$" diff --git a/.hyperlint/automations/styles/cloudflare-automation/NonStandardQuotes.yml b/.hyperlint/automations/styles/cloudflare-automation/NonStandardQuotes.yml deleted file mode 100644 index f8123afb00..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/NonStandardQuotes.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# 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. Only update the quotes and nothing else. Double quotes are fine, so long as they aren't directional." -level: warning -ignorecase: true -link: https://developers.cloudflare.com/style-guide/grammar/punctuation-marks-and-symbols/quotation-marks/ -scope: raw -raw: - - "[‘’“”]" diff --git a/.hyperlint/automations/styles/cloudflare-automation/UnclearAntecedent.yml b/.hyperlint/automations/styles/cloudflare-automation/UnclearAntecedent.yml deleted file mode 100644 index bc15c34394..0000000000 --- a/.hyperlint/automations/styles/cloudflare-automation/UnclearAntecedent.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -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. Only update this part of the sentence and nothing else." -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" diff --git a/.hyperlint/automations/styles/cloudflare/spelling-exceptions.txt b/.hyperlint/automations/styles/cloudflare/spelling-exceptions.txt deleted file mode 100644 index 876a1cfdad..0000000000 --- a/.hyperlint/automations/styles/cloudflare/spelling-exceptions.txt +++ /dev/null @@ -1,382 +0,0 @@ -acls -airtable -agentless -akamai -akamai's -allowlist -allowlists -allowlisted -altus -anonymizer -anycast -apis -approvers -apresia -asn -asns -astro -async -atlassian -automations -backhaul -bing -bitly -blazor -blockchain -bolded -bool -boolean -booleans -breakpoint -broadcasted -brotli -bundler -cacheable -cacheability -captcha -captchas -cas -cdn -cdns -clientless -clis -cloudflared -cloudforce -cidrs -colocation -config -contentful -cPanel -cpus -cron -crowdstrike -crypto -cryptocurrency -Cryptomining -ctx -cyber -cybersafe -databrink -datadog -datastore -ddos -deno -dependabot -descaler -deserialization -deserializing -dev -devtools -Digicert -discoverability -dispositioned -dns -doctype -docusaurus -drand -egressed -egressing -eleventy -enricher -env -equinix -esbuild -etag -etags -ethereum -exfiltrate -exfiltration -failover -fastly -favicon -focusable -formspree -frontmatter -Gemalto -gemfile -geo -geolocate -Glendive -gokeyless -gpus -grafana -gridsome -GSuite -gzip -gzipped -hcaptcha -healthchecks -Heartbleed -hellix -hexo -hibernatable -hono -hostname -hostnames -hsms -HTMLRewriter -http -https -hubspot -hyperdrive -hyperdrives -hypertable -hypertables -iCloud -ingressed -interxion -iterable -iterables -ivanti -iprange -ips -ipsec -jamf -JAMStack -Jetpack -jira -JMeter -journaling -journaled -JSONata -jq -junos -jwts -kentik -keyless -Kibana -Kokoris -koropi -kv -kwai -Kyber -lambda -langchain -licensor -Linux -livestream -llms -lockdown -lowercased -logpull -logpush -logshare -lookback -lookups -loopback -lossy -malvertizing -marseille -maxmind -mbps -megaport -Memcache -meraki -middleware -mimecast -miniflare -misconfigured -mitigations -mixpanel -momento -monorepo -monorepos -monospace -multifactor -nameserver -nameservers -namespace -namespaced -namespaces -nats -Netflow -netlify -netmask -nonces -npm -nShield -nuxt -oauth -offboarding -offramp -okta -onramp -onboarded -onboarding -openssl -pagerduty -pageview -pageviews -passthrough -pathing -pdfs -performant -pfSense -pinecone -plaintext -pnpm -polyfill -polyfills -postgres -preact -preconfigured -preconnect -prefetch -prefetching -preload -prepend -prepended -prepending -prepends -prequeue -prequeueing -prisma -proxied -proxying -Proxyflare -punycode -qradar -qstash -Qualys -quantiles -quic -quickstarts -quora -qwik -railgun -readme -realtime -recaptcha -recommender -redactions -Redsys -referer -repo -revalidated -revalidates -revalidating -rollout -rollup -routable -rubygems -ruleset -rulesets -runtimes -sdk -sdks -Sectigo -serializable -severity -serverless -siems -sFlow -sharding -shortcode -shortcodes -signatureless -sippy -slackbot -snapchat -softflowd -sourcemap -sparkline -splunk -SQLi -ssl -stackable -Storyblok -strapi -stringify -strongswan -stytch -subcommand -subcommands -subfolder -subfolders -subhost -subhosts -submenu -subnet -subnets -subpage -subpages -subpath -subpaths -subreddit -subrequest -subrequests -subshell -substring -sumologic -supabase -svgs -swgs -tcp -teraco -tiering -tls -todo -toolchain -tooltip -tooltips -traceroute -transpile -transpiled -transpiling -ttls -turso -twilio -Ubiquiti -udp -unapplied -uncacheable -uncached -uncategorized -unencrypted -unindexed -unmanaged -unmetered -unoptimized -unproxied -unredacted -unsplash -unscanned -unscoped -upstash -unstyled -untrusted -uppercased -uris -urls -util -utms -waf -waitlist -walkthrough -wasm -wayback -webex -webpack -webpage -webpages -wireguard -wireshark -workerd -www -xata -XPath -vectorize -velocloud -vercel -viewport -vite -vms -vpn -vpns -vue -yubikey -yubikeys -zaraz -zaraz's -zayo -Zscaler diff --git a/.hyperlint/automations/styles/config/vocabularies/cloudflare/accept.txt b/.hyperlint/automations/styles/plain-text-style-checks/casing.md similarity index 63% rename from .hyperlint/automations/styles/config/vocabularies/cloudflare/accept.txt rename to .hyperlint/automations/styles/plain-text-style-checks/casing.md index 97cc95b1be..bc09f8a31c 100644 --- a/.hyperlint/automations/styles/config/vocabularies/cloudflare/accept.txt +++ b/.hyperlint/automations/styles/plain-text-style-checks/casing.md @@ -1,4 +1,5 @@ -anycast +Correct casings or misspellings for the following words. Ignore this rule if the words are in code blocks, `code fences`, or in HTML or Markdown links. + Bitbucket cdnjs CLI @@ -30,15 +31,11 @@ unpkg UNIX URI URL -Vectorize WebRTC WebSocket Wi-Fi WordPress -Worker -Workers -[wW]rangler -wrangler.toml +Wrangler VMware VPN YubiKey diff --git a/.hyperlint/automations/styles/plain-text-style-checks/eolwhitespace.md b/.hyperlint/automations/styles/plain-text-style-checks/eolwhitespace.md new file mode 100644 index 0000000000..5be940c439 --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/eolwhitespace.md @@ -0,0 +1 @@ +Remove whitespace characters from the end of the line. Only remove the whitespace and nothing else. diff --git a/.hyperlint/automations/styles/plain-text-style-checks/exclamation-marks.md b/.hyperlint/automations/styles/plain-text-style-checks/exclamation-marks.md new file mode 100644 index 0000000000..43236d2327 --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/exclamation-marks.md @@ -0,0 +1 @@ +Do not use exclamation points (`!`) in text. Only replace the exclamation point and no other text. diff --git a/.hyperlint/automations/styles/plain-text-style-checks/heading-links.md b/.hyperlint/automations/styles/plain-text-style-checks/heading-links.md new file mode 100644 index 0000000000..0ecebf08d7 --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/heading-links.md @@ -0,0 +1,3 @@ +Do not include links in a heading. Headings already have self-referencing anchor links. + +Only remove the link and nothing else. diff --git a/.hyperlint/automations/styles/plain-text-style-checks/heading-punctuation.md b/.hyperlint/automations/styles/plain-text-style-checks/heading-punctuation.md new file mode 100644 index 0000000000..92019cf533 --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/heading-punctuation.md @@ -0,0 +1,3 @@ +Do not use end punctuation in headings. + +Only update the punctuation and nothing else. diff --git a/.hyperlint/automations/styles/plain-text-style-checks/nonstandard-quotes.md b/.hyperlint/automations/styles/plain-text-style-checks/nonstandard-quotes.md new file mode 100644 index 0000000000..01b566e97b --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/nonstandard-quotes.md @@ -0,0 +1,3 @@ +Do not use directional quotes (`‘`, `’`, `“`, `”`), either left or right. + +Replace these marks with their non-directional equivalent (`'` or `"`). Only replace the directional quotes and nothing else. diff --git a/.hyperlint/automations/styles/plain-text-style-checks/unclear-antecedent.md b/.hyperlint/automations/styles/plain-text-style-checks/unclear-antecedent.md new file mode 100644 index 0000000000..a399e2b2fb --- /dev/null +++ b/.hyperlint/automations/styles/plain-text-style-checks/unclear-antecedent.md @@ -0,0 +1,14 @@ +Instead of phrases like the following, try starting this sentence with a specific subject and verb. Only update this part of the sentence and nothing else. + +Phrases to replace are: + +- "That is" +- "That was" +- "There are" +- "There were" +- "These are" +- "These were" +- "This is" +- "This was" +- "Those are" +- "Those were"