Skip to content

Commit 126a61a

Browse files
committed
adding markdown linting script
1 parent 60049f3 commit 126a61a

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.markdownlintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"default": true,
3+
"MD018": true,
4+
"MD003": { "style": "atx" }
5+
}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,13 @@ summary: A brief tutorial on creating an Angular client app using the Loopback A
6666
6767
{% include readmes/loopback-example-angular.md %}
6868
```
69+
70+
### Linting Readmes
71+
72+
There is an additional `npm script` that "lints" the readmes for markdown formatting problems. It is currently "experimental", see #49 for more info.
73+
74+
You can run this script thus:
75+
76+
```js
77+
$ npm run lint-readmes
78+
```

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ port: 4001
2828
exclude:
2929
- .idea/
3030
- .gitignore
31+
- node_modules
3132
# these are the files and directories that jekyll will exclude from the build
3233

3334
feedback_email: [email protected]

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
"version": "1.0.0",
44
"description": "This file: Node-dependant workflow scripts for the jekyll-based site",
55
"scripts": {
6-
"fetch-readmes": "get-readmes --repos=./_data --out=./_includes/readmes"
6+
"fetch-readmes": "get-readmes --repos=./_data --out=./_includes/readmes",
7+
"lint-readmes" : "markdownlint _includes/readmes/"
78
},
89
"repository": {
910
"type": "git",
1011
"url": "git+https://github.com/Strongloop/loopback.io.git"
1112
},
1213
"devDependencies": {
13-
"getreadmes": "github:strongloop/get-readmes"
14+
"getreadmes": "github:strongloop/get-readmes",
15+
"markdownlint-cli": "github:sequoia/markdownlint-cli"
1416
}
1517
}

0 commit comments

Comments
 (0)