Skip to content
Open
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
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ scripts/ # Build and automation scripts
1. **Vale linting** (`.github/workflows/vale.yml`)
- Lints all markdown/MDX content
- Uses ripgrep to preprocess variable substitutions
- Requires `mdx2vast` global npm package
2. **React validation** (`.github/workflows/validate.yml`)
- Runs Jest unit tests with `yarn test:components:ci`

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Install dependencies
if: steps.changed.outputs.skip == 'false'
run: yarn install --immutable
- name: Install mdx2vast globally
if: steps.changed.outputs.skip == 'false'
run: npm install -g mdx2vast
- name: Swap stuff
if: steps.changed.outputs.skip == 'false'
run: |
Expand Down
4 changes: 1 addition & 3 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ StylesPath = .github/styles

MinAlertLevel = warning

Packages = MDX

Vocab = CalicoDocs, CalicoBrands, CalicoTerminology, CalicoTools, CalicoAcronyms

[*.{md,mdx}]
Expand All @@ -13,7 +11,7 @@ BasedOnStyles = Vale, CalicoStyle
# The built-in Vale.Terms check generates many false positives because it flags
# lowercase technical terms (nginx, kubernetes, bgp, etc.) in table cells,
# parenthetical component lists, and other code-adjacent contexts.
# TokenIgnores cannot fix this because it runs BEFORE the MDX parser (mdx2vast),
# TokenIgnores cannot fix this because it runs BEFORE the MDX parser,
# and broad patterns (hyphenated words, camelCase, URLs) corrupt the MDX AST
# when they match inside fenced code blocks.
Vale.Terms = warning
Expand Down
7 changes: 3 additions & 4 deletions scripts/vale-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
# Vale wrapper that handles the $[variable] syntax used in these docs.
#
# MDX files use $[prodname], $[manifestsUrl], etc. for Docusaurus variable
# interpolation. mdx2vast (Vale's MDX parser) uses acorn which crashes on
# this non-standard JS syntax. This script temporarily replaces $[...] with
# interpolation. Vale's spell checker flags the interpolated names (e.g.
# "prodname") as misspellings. This script temporarily replaces $[...] with
# a placeholder before running Vale, then restores the original files.
#
# Prerequisites:
# brew install vale ripgrep
# npm install -g mdx2vast
# vale sync
Comment on lines 10 to 12
#
# Usage:
Expand All @@ -32,7 +31,7 @@ if ! mkdir "$LOCKDIR" 2>/dev/null; then
fi

# Check dependencies
for cmd in vale mdx2vast rg perl; do
for cmd in vale rg perl; do
if ! command -v "$cmd" &>/dev/null; then
echo "Error: $cmd is not installed." >&2
rm -rf "$LOCKDIR"
Expand Down