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
35 changes: 35 additions & 0 deletions .github/workflows/check-vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check - Vale

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'blog/**'
- '.vale.ini'
- '.vale/**'
pull_request:
paths:
- 'docs/**'
- 'blog/**'
- '.vale.ini'
- '.vale/**'

jobs:
vale:
name: Vale linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Vale Linter
uses: errata-ai/vale-action@reviewdog
with:
files: docs
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Workflow triggers on blog but only lints docs

The workflow triggers on changes to blog/** in the paths section, but the files: docs parameter only lints the docs directory. When someone modifies blog content, the workflow runs but the blog files are never actually checked by Vale, defeating the purpose of having the trigger path. The files parameter likely needs to include both directories.

Additional Locations (2)

Fix in Cursor Fix in Web

reporter: github-pr-review
fail_on_error: false
vale_flags: "--config=.vale.ini"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 48 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
StylesPath = .vale/styles
MinAlertLevel = suggestion

Vocab = Codat

Packages = Google

# Global ignores - skip frontmatter
[formats]
mdx = md

# File patterns
[*.{md,mdx}]
BasedOnStyles = Vale, Google

# Disable rules that conflict with technical docs or MDX
# Acronyms - too noisy for API docs
Google.Acronyms = NO
# Allow "we" in company documentation
Google.We = NO
# Spacing rule has false positives with MDX components
Google.Spacing = NO
# Semicolons in code references cause false positives
Google.Semicolons = suggestion

# Demote some rules to suggestions rather than warnings
Google.Headings = suggestion
Google.Parens = suggestion
Google.Passive = suggestion
Google.Will = suggestion
Google.FirstPerson = suggestion
Google.Exclamation = suggestion
Google.Colons = suggestion
Google.Quotes = suggestion

# Vale built-in rules
Vale.Spelling = NO
Vale.Terms = YES

# Ignore code blocks, frontmatter, and JSX
BlockIgnores = (?s) *```.*?```, (?s)^---.*?---
TokenIgnores = (`[^`]+`), (\{[^}]+\}), (<[A-Z][^>]*>.*?</[A-Z][^>]*>), (<[A-Z][^/>]*/?>)

[*.yml]
BasedOnStyles =

[*.json]
BasedOnStyles =
98 changes: 98 additions & 0 deletions .vale/styles/config/vocabularies/Codat/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
API
APIs
BACS
BigCommerce
Capchase
Chargebee
Codat
Codat's
datasource
datasources
datatype
datatypes
deauthorization
deauthorized
decisioning
drawdowns
eCommerce
endpoint
endpoints
FreshBooks
IBAN
Intacct
Intacct's
Intuit
Intuit's
Lightspeed
Maxio
metadata
MYOB
neobanks
NetSuite
Pandle
payables
Phorest
PrestaShop
QuickBooks
recategorization
recategorize
recategorizing
Recurly
SDK
SDKs
Svix
TrueLayer
TrueLayer's
usecase
usecases
Wayflyer
webhook
webhooks
writeback
Xero
Xero's
Zettle
frontmatter
codeblock
codeblocks
async
OAuth
iframe
dropdown
multi-select
multi-currency
onboarding
config
repo
repos
changelog
Presta
financials
serverless
subdomain
subdomains
idempotency
boolean
booleans
nullable
enum
enums
timestamp
timestamps
hostname
param
params
JSON
UUID
UUIDs
SMB
SMBs
lender
lenders
fintech
fintechs
Plaid
Stripe
Chargebee
SaaS
GraphQL
7 changes: 7 additions & 0 deletions .vale/styles/config/vocabularies/Codat/reject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Words to reject/flag
# Add terms that should never appear in docs
blacklist
whitelist
master
slave
sanity check
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"format:js": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
"format:js:check": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
"format:mdx": "prettier --write \"**/*.{md,mdx}\"",
"format:mdx:check": "prettier --check \"**/*.{md,mdx}\""
"format:mdx:check": "prettier --check \"**/*.{md,mdx}\"",
"vale:sync": "vale sync",
"vale": "vale docs/",
"vale:check": "vale --minAlertLevel=warning docs/"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: NPM vale scripts also exclude blog directory

The vale and vale:check npm scripts only lint the docs/ directory, excluding the blog/ directory. This is inconsistent with the workflow trigger paths which include both directories. When running Vale locally via npm scripts, blog content won't be checked, even though the repository has a blog/ directory used for documentation content.

Fix in Cursor Fix in Web

},
"dependencies": {
"@amplitude/analytics-browser": "^2.23.3",
Expand Down
Loading