Skip to content

Commit e0ff29a

Browse files
committed
markdownlint-cli and prettier
1 parent cef6266 commit e0ff29a

6 files changed

Lines changed: 1468 additions & 22 deletions

File tree

.github/workflows/lint.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,24 @@
22
name: Lint
33

44
"on":
5-
push: null
6-
pull_request: null
7-
8-
permissions: {}
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
913

1014
jobs:
1115
build:
1216
name: Lint
1317
runs-on: ubuntu-latest
1418

15-
permissions:
16-
contents: read
17-
packages: read
18-
# To report GitHub Actions status checks
19-
statuses: write
20-
2119
steps:
2220
- name: Checkout code
2321
uses: actions/checkout@v4
24-
with:
25-
# super-linter needs the full git history to get the
26-
# list of files that changed across commits
27-
fetch-depth: 0
28-
29-
- name: Super-linter
30-
uses: super-linter/super-linter@v7.3.0 # x-release-please-version
31-
env:
32-
# To report GitHub Actions status checks
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
FIX_MARKDOWN: true
22+
- name: npm install
23+
run: npm install
24+
- name: Run the linter
25+
run: ./lint

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Ignore hidden Mac OS directory files
2-
**/.DS_Store
2+
**/.DS_Store
3+
node_modules/

.markdownlint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "markdownlint/style/prettier",
3+
"ignore": "node_modules/"
4+
}

lint

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
npm exec -- markdownlint --ignore 'node_modules/' '**/*.md'
6+
npm exec -- prettier --check .

0 commit comments

Comments
 (0)