diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 28277299c6f..14b8b2e7f23 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # Pinned to V2.1.1 with: - vale_flags: --config=docusaurus/vale.ini --minAlertLevel=warning # Location of Vale's config file and min alert level for CI (local linters will still see suggestions) + vale_flags: --config=docusaurus/vale-ci.ini --minAlertLevel=warning # CI-specific config that disables certain rules (see vale-ci.ini vs vale.ini) files: docs/ # Folder in which to lint filter_mode: added # Only lint things that have changed fail_on_error: false # Don't fail if the linter finds issues (compliance is optional) diff --git a/docusaurus/vale-ci.ini b/docusaurus/vale-ci.ini new file mode 100644 index 00000000000..b3ad2bec257 --- /dev/null +++ b/docusaurus/vale-ci.ini @@ -0,0 +1,49 @@ +# This file controls Vale's behavior when linting your documentation in GitHub CI. +# For local linting, use vale.ini instead. +# The main difference is that this file disables certain rules that should only run locally. + +# Where styles and rules are located +StylesPath = ../docs/vale-styles + +#Custom vocabulary definition +Vocab = Airbyte + +# Minimum level at which Vale will trigger an alert +MinAlertLevel = suggestion + +# External packages +Packages = Google, write-good, MDX + +# What Vale lints +[*.{md,txt}] + +# What Vale lints with +BasedOnStyles = Vale, Google, write-good, airbyte + +## Ignore some imported style rules because they're too esoteric or overlap with another library +write-good.E-Prime = NO +write-good.Passive = NO +write-good.TooWordy = NO +Vale.Terms = NO + +## Rules disabled for GitHub CI only (these still run locally) +Google.Headings = NO + +## Ignore: +## - Anything in angle brackets that starts with an uppercase letter (IE a React component) +## - Anything in double curly braces (IE a MarkDown variable) +## - Single backticks +## - MarkDown links or images +## - URLS +## - emails +## - URLs without http +## - React component imports +## More info: https://vale.sh/docs/keys/tokenignores +TokenIgnores = (<\/?[A-Z].+>), \{\{([^}]*)\}\}, (\x60[^\n\x60]+\x60), (\[[^\n]+[^\n]*\]\([^\n]+\)), (http[^\n]+), ([^\n]+@[^\n]+\.[^\n]+), (\[[^\n]+?\.(?:com|net|org|gov|ca|co|us|io|info|xyz|ai)\]), (import [^\n]+ from [^\n]+) + +## Exclude certain block-level sections of text that don't have an associated HTML tag that could be used with SkippedScopes. +## More info: https://vale.sh/docs/keys/blockignores +BlockIgnores = (```(\w)[\s\S]*?```)/g + +[formats] +mdx = md diff --git a/docusaurus/vale.ini b/docusaurus/vale.ini index 83ee1540edf..462c2d315ef 100644 --- a/docusaurus/vale.ini +++ b/docusaurus/vale.ini @@ -1,4 +1,5 @@ -# This file controls Vale's behavior when linting your documentation. +# This file controls Vale's behavior when linting your documentation locally. +# For GitHub CI linting, see vale-ci.ini which disables certain rules for CI only. # Where styles and rules are located StylesPath = ../docs/vale-styles