Skip to content

Commit 5acdbfa

Browse files
committed
Merge branch 'linting-tasks' into my-various-prs
2 parents db2e779 + d3a7288 commit 5acdbfa

File tree

4 files changed

+76
-4
lines changed

4 files changed

+76
-4
lines changed

.vscode/tasks.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Markdown lint",
8+
"type": "npm",
9+
"script": "lint",
10+
"problemMatcher": {
11+
"fileLocation": ["relative", "${workspaceFolder}"],
12+
"severity": "error",
13+
"owner": "lint-owner",
14+
"source": "lint-source",
15+
"pattern": {
16+
"regexp": "^(.*?):(\\d+)(?::(\\d+))? (MD\\S+) (.*)$",
17+
"file": 1,
18+
"line": 2,
19+
"column": 3,
20+
"code": 4,
21+
"message": 5
22+
}
23+
}
24+
},
25+
{
26+
"label": "Markdown lint (watch)",
27+
"type": "npm",
28+
"script": "lint:watch",
29+
"isBackground": true,
30+
"problemMatcher": {
31+
"fileLocation": ["relative", "${workspaceFolder}"],
32+
"severity": "error",
33+
"owner": "lint-owner",
34+
"source": "lint-source",
35+
"pattern": {
36+
"regexp": "^(.*?):(\\d+)(?::(\\d+))? (MD\\S+) (.*)$",
37+
"file": 1,
38+
"line": 2,
39+
"column": 3,
40+
"code": 4,
41+
"message": 5
42+
},
43+
"background": {
44+
"activeOnStart": true,
45+
"beginsPattern": "^lint START$",
46+
"endsPattern": "^lint END$"
47+
}
48+
}
49+
}
50+
]
51+
}

lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ else
1010
if [ $? -ne 0 ] ; then
1111
echo "Try '\''./lint --fix'\'' to see if any automatic fixes are possible"
1212
fi
13+
echo "lint END"
1314
' 0
1415

16+
echo "lint START"
1517
npm exec -- markdownlint --ignore 'node_modules/' '**/*.md'
1618
npm exec -- prettier --check .
1719
fi

package-lock.json

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

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"dependencies": {
33
"markdownlint-cli": "^0.44.0",
4-
"prettier": "^3.5.3"
4+
"prettier": "^3.5.3",
5+
"watch": "^0.13.0"
6+
},
7+
"scripts": {
8+
"lint": "./lint",
9+
"lint:watch": "watch ./lint . --ignoreDirectoryPattern 'node_modules|.git'"
510
}
611
}

0 commit comments

Comments
 (0)