Skip to content

Commit 1be572b

Browse files
authored
Merge pull request #1716 from mcclowes/feat/vale
Adding vale
2 parents b5d37b9 + 4d8e092 commit 1be572b

File tree

5 files changed

+192
-1
lines changed

5 files changed

+192
-1
lines changed

.github/workflows/check-vale.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check - Vale
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'blog/**'
10+
- '.vale.ini'
11+
- '.vale/**'
12+
pull_request:
13+
paths:
14+
- 'docs/**'
15+
- 'blog/**'
16+
- '.vale.ini'
17+
- '.vale/**'
18+
19+
jobs:
20+
vale:
21+
name: Vale linting
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Vale Linter
28+
uses: errata-ai/vale-action@reviewdog
29+
with:
30+
files: docs
31+
reporter: github-pr-review
32+
fail_on_error: false
33+
vale_flags: "--config=.vale.ini"
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.vale.ini

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
StylesPath = .vale/styles
2+
MinAlertLevel = suggestion
3+
4+
Vocab = Codat
5+
6+
Packages = Google
7+
8+
# Global ignores - skip frontmatter
9+
[formats]
10+
mdx = md
11+
12+
# File patterns
13+
[*.{md,mdx}]
14+
BasedOnStyles = Vale, Google
15+
16+
# Disable rules that conflict with technical docs or MDX
17+
# Acronyms - too noisy for API docs
18+
Google.Acronyms = NO
19+
# Allow "we" in company documentation
20+
Google.We = NO
21+
# Spacing rule has false positives with MDX components
22+
Google.Spacing = NO
23+
# Semicolons in code references cause false positives
24+
Google.Semicolons = suggestion
25+
26+
# Demote some rules to suggestions rather than warnings
27+
Google.Headings = suggestion
28+
Google.Parens = suggestion
29+
Google.Passive = suggestion
30+
Google.Will = suggestion
31+
Google.FirstPerson = suggestion
32+
Google.Exclamation = suggestion
33+
Google.Colons = suggestion
34+
Google.Quotes = suggestion
35+
36+
# Vale built-in rules
37+
Vale.Spelling = NO
38+
Vale.Terms = YES
39+
40+
# Ignore code blocks, frontmatter, and JSX
41+
BlockIgnores = (?s) *```.*?```, (?s)^---.*?---
42+
TokenIgnores = (`[^`]+`), (\{[^}]+\}), (<[A-Z][^>]*>.*?</[A-Z][^>]*>), (<[A-Z][^/>]*/?>)
43+
44+
[*.yml]
45+
BasedOnStyles =
46+
47+
[*.json]
48+
BasedOnStyles =
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
API
2+
APIs
3+
BACS
4+
BigCommerce
5+
Capchase
6+
Chargebee
7+
Codat
8+
Codat's
9+
datasource
10+
datasources
11+
datatype
12+
datatypes
13+
deauthorization
14+
deauthorized
15+
decisioning
16+
drawdowns
17+
eCommerce
18+
endpoint
19+
endpoints
20+
FreshBooks
21+
IBAN
22+
Intacct
23+
Intacct's
24+
Intuit
25+
Intuit's
26+
Lightspeed
27+
Maxio
28+
metadata
29+
MYOB
30+
neobanks
31+
NetSuite
32+
Pandle
33+
payables
34+
Phorest
35+
PrestaShop
36+
QuickBooks
37+
recategorization
38+
recategorize
39+
recategorizing
40+
Recurly
41+
SDK
42+
SDKs
43+
Svix
44+
TrueLayer
45+
TrueLayer's
46+
usecase
47+
usecases
48+
Wayflyer
49+
webhook
50+
webhooks
51+
writeback
52+
Xero
53+
Xero's
54+
Zettle
55+
frontmatter
56+
codeblock
57+
codeblocks
58+
async
59+
OAuth
60+
iframe
61+
dropdown
62+
multi-select
63+
multi-currency
64+
onboarding
65+
config
66+
repo
67+
repos
68+
changelog
69+
Presta
70+
financials
71+
serverless
72+
subdomain
73+
subdomains
74+
idempotency
75+
boolean
76+
booleans
77+
nullable
78+
enum
79+
enums
80+
timestamp
81+
timestamps
82+
hostname
83+
param
84+
params
85+
JSON
86+
UUID
87+
UUIDs
88+
SMB
89+
SMBs
90+
lender
91+
lenders
92+
fintech
93+
fintechs
94+
Plaid
95+
Stripe
96+
Chargebee
97+
SaaS
98+
GraphQL
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Words to reject/flag
2+
# Add terms that should never appear in docs
3+
blacklist
4+
whitelist
5+
master
6+
slave
7+
sanity check

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
"format:js": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
1919
"format:js:check": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
2020
"format:mdx": "prettier --write \"**/*.{md,mdx}\"",
21-
"format:mdx:check": "prettier --check \"**/*.{md,mdx}\""
21+
"format:mdx:check": "prettier --check \"**/*.{md,mdx}\"",
22+
"vale:sync": "vale sync",
23+
"vale": "vale docs/",
24+
"vale:check": "vale --minAlertLevel=warning docs/"
2225
},
2326
"dependencies": {
2427
"@amplitude/analytics-browser": "^2.23.3",

0 commit comments

Comments
 (0)