Skip to content

Commit

Permalink
Docs: verify documentation using markdownlint
Browse files Browse the repository at this point in the history
This commit bundles a custom version of markdownlint-cli, which includes
markdownlint@0.6.1.

This can be replaced by a regular release of markdownlint-client, once
igorshubovych/markdownlint-cli#21 is merged and
a version is published.

markdownlint is now used for verifying all the markdown files in `docs/`
as a precommit hook and a task that can be used by CI.
  • Loading branch information
mroderick committed Nov 1, 2017
1 parent aa10bb7 commit 46ffad3
Show file tree
Hide file tree
Showing 6 changed files with 1,238 additions and 180 deletions.
18 changes: 18 additions & 0 deletions .markdownlintrc
@@ -0,0 +1,18 @@
{
"default": false,
"MD003": { "style": "atx" },
"MD007": { "indent": 4 },
"MD012": {
"maximum": 2
},
"MD013": false,
"no-trailing-punctuation": {
"punctuation": ".,;:!"
},
"MD033": {
"allowed_elements": ["dl", "dt", "dd", "code"]
},
"first-line-h1": false,
"no-hard-tabs": true,
"no-trailing-spaces": true
}
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -25,6 +25,7 @@ before_script:
# ESLint only supports Node >=4
- if [ "x$TRAVIS_NODE_VERSION" = "x6" ]; then npm run lint; fi
# run these on node 6 to have npm 3 with flat dependencies
- if [ "x$TRAVIS_NODE_VERSION" = "x6" ]; then npm run lint-markdown; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x6" ]; then npm run test-headless; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x6" ]; then npm run test-webworker; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x6" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then npm run test-cloud; fi
Expand Down
5 changes: 5 additions & 0 deletions docs/CONTRIBUTING.md
Expand Up @@ -39,3 +39,8 @@ bundle exec jekyll serve

After that you can access the site at http://localhost:4000/

## Linting of Markdown

To help keep the documentation syntactically consistent and free of syntax violations, a pre-commit hook using [markdownlint](https://github.com/DavidAnson/markdownlint) verifies Markdown documents.

The CI server uses [markdownlint](https://github.com/DavidAnson/markdownlint) with the same configuration to verify the pull request.
Binary file added markdownlint-cli-0.3.1-custom.tgz
Binary file not shown.

0 comments on commit 46ffad3

Please sign in to comment.