Skip to content

Commit

Permalink
adding markdown linting script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sequoia committed Oct 7, 2016
1 parent 60049f3 commit 126a61a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .markdownlintrc
@@ -0,0 +1,5 @@
{
"default": true,
"MD018": true,
"MD003": { "style": "atx" }
}
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -66,3 +66,13 @@ summary: A brief tutorial on creating an Angular client app using the Loopback A
{% include readmes/loopback-example-angular.md %}
```

### Linting Readmes

There is an additional `npm script` that "lints" the readmes for markdown formatting problems. It is currently "experimental", see #49 for more info.

You can run this script thus:

```js
$ npm run lint-readmes
```
1 change: 1 addition & 0 deletions _config.yml
Expand Up @@ -28,6 +28,7 @@ port: 4001
exclude:
- .idea/
- .gitignore
- node_modules
# these are the files and directories that jekyll will exclude from the build

feedback_email: rmckinn@us.ibm.com
Expand Down
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -3,13 +3,15 @@
"version": "1.0.0",
"description": "This file: Node-dependant workflow scripts for the jekyll-based site",
"scripts": {
"fetch-readmes": "get-readmes --repos=./_data --out=./_includes/readmes"
"fetch-readmes": "get-readmes --repos=./_data --out=./_includes/readmes",
"lint-readmes" : "markdownlint _includes/readmes/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Strongloop/loopback.io.git"
},
"devDependencies": {
"getreadmes": "github:strongloop/get-readmes"
"getreadmes": "github:strongloop/get-readmes",
"markdownlint-cli": "github:sequoia/markdownlint-cli"
}
}

0 comments on commit 126a61a

Please sign in to comment.