Skip to content
Merged
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
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Vocs Docs

on:
push:
paths:
- 'vocs-docs/**'
pull_request:
paths:
- 'vocs-docs/**'

jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: vocs-docs
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
9 changes: 9 additions & 0 deletions vocs-docs/.remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import remarkPresetLintRecommended from 'remark-preset-lint-recommended'
import remarkLintNoShortcutReferenceLink from 'remark-lint-no-shortcut-reference-link'

export default {
plugins: [
remarkPresetLintRecommended,
[remarkLintNoShortcutReferenceLink, false]
]
}
7 changes: 6 additions & 1 deletion vocs-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"dev": "vocs dev",
"build": "vocs build",
"preview": "vocs preview"
"preview": "vocs preview",
"lint": "remark ./**/*.mdx --frail"
},
"dependencies": {
"react": "latest",
Expand All @@ -15,6 +16,10 @@
},
"devDependencies": {
"@types/react": "latest",
"remark": "^15.0.1",
"remark-cli": "^12.0.1",
"remark-lint-no-shortcut-reference-link": "^4.0.1",
"remark-preset-lint-recommended": "^7.0.1",
"typescript": "latest"
}
}
Loading