-
Notifications
You must be signed in to change notification settings - Fork 43
Adding vale #1716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding vale #1716
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| reporter: github-pr-review | ||
| fail_on_error: false | ||
| vale_flags: "--config=.vale.ini" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| 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 = |
| 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 |
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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/" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: NPM vale scripts also exclude blog directoryThe |
||
| }, | ||
| "dependencies": { | ||
| "@amplitude/analytics-browser": "^2.23.3", | ||
|
|
||
There was a problem hiding this comment.
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 thefiles: docsparameter only lints thedocsdirectory. 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. Thefilesparameter likely needs to include both directories.Additional Locations (2)
.github/workflows/check-vale.yml#L8-L9.github/workflows/check-vale.yml#L14-L15