Skip to content

Add Vale testing workflow for pull requests #1778

Add Vale testing workflow for pull requests

Add Vale testing workflow for pull requests #1778

Workflow file for this run

name: Remark-lint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
remark-lint:
name: runner / remark-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
# Pinned below 11.12.0, whose self-install crashes with
# "Cannot use 'in' operator to search for 'integrity' in undefined".
# https://github.com/pnpm/action-setup/issues/276
# https://github.com/pnpm/pnpm/issues/12959
version: 11.11.0
# npm (not pnpm) is intentional: remark-cli is installed globally by the
# action at /usr/local/lib/node_modules/. pnpm's global store is not on
# that resolution path, so remark-cli would fall back to resolving
# remark-mdx from the project's node_modules, where @mdx-js/react pulls
# in mdast-util-mdx-jsx@3 — incompatible with remark-cli@10's bundled
# unified v10 stack. npm -g puts remark-mdx@2 next to remark-cli so the
# versions stay compatible. install_deps: false prevents the action from
# running npm install and reintroducing the incompatible project deps.
- name: Install remark-mdx globally
run: npm install -g remark-mdx@2
- name: remark-lint
uses: reviewdog/action-remark-lint@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
fail_level: "warning"
level: "warning"
install_deps: false
remark_args: "--use=remark-preset-lint-recommended --use=remark-mdx --ext .md,.mdx"