Skip to content

Commit 7a40d38

Browse files
[docs-infra] Fix Vale no longer working
1 parent f1a4774 commit 7a40d38

File tree

4 files changed

+133
-3
lines changed

4 files changed

+133
-3
lines changed

.github/workflows/vale-action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ jobs:
1313
pull-requests: write
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
- name: Extract Vale version from pnpm-lock.yaml
17+
id: vale-version
18+
run: |
19+
# Extract version from lock file
20+
VERSION=$(awk -F"@|'" '/@vvago\/vale@/ {print $4}' pnpm-lock.yaml | head -n1)
21+
echo "Extracted Vale version: $VERSION"
22+
echo "vale_version=$VERSION" >> $GITHUB_OUTPUT
1623
- uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
1724
continue-on-error: true # GitHub Action flag needed until https://github.com/errata-ai/vale-action/issues/89 is fixed
1825
with:
26+
version: ${{ steps.vale-version.outputs.vale_version }}
1927
# Errors should be more visible
2028
fail_on_error: true
2129
# The other reports don't work, not really https://github.com/reviewdog/reviewdog#reporters

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ node_modules
2424
package-lock.json
2525
size-snapshot.json
2626
# vale downloaded config
27-
.github/styles/Google
28-
.github/styles/MUI
29-
.github/styles/.vale-config
27+
.github/styles/
3028
.nx/cache

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"eslint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
2828
"stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.{js,ts,tsx}\" \"**/*.css\" --ignore-path .gitignore",
2929
"markdownlint": "markdownlint-cli2 \"**/*.{md,mdx}\"",
30+
"valelint": "pnpm vale sync && git ls-files | grep -h \".md$\" | xargs pnpm vale --filter='.Level==\"error\"'",
3031
"prettier": "pretty-quick --ignore-path .eslintignore",
3132
"prettier:all": "prettier --write . --ignore-path .eslintignore",
3233
"size:snapshot": "node --max-old-space-size=4096 ./scripts/sizeSnapshot/create",
@@ -83,6 +84,7 @@
8384
"@types/yargs": "^17.0.33",
8485
"@typescript-eslint/eslint-plugin": "^7.18.0",
8586
"@typescript-eslint/parser": "^7.18.0",
87+
"@vvago/vale": "^3.11.2",
8688
"@vitejs/plugin-react": "^4.4.1",
8789
"@vitest/browser": "^3.1.2",
8890
"@vitest/coverage-istanbul": "3.1.1",

pnpm-lock.yaml

Lines changed: 122 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)