-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (46 loc) · 1.73 KB
/
Copy pathlint.yaml
File metadata and controls
53 lines (46 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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"