Skip to content

Commit

Permalink
add @mocha/markdownlint-cli; closes #3172
Browse files Browse the repository at this point in the history
- forked [markdownlint-cli](https://npm.im/markdownlint-cli) to fix a
  glob-related bug; will abandon our version if/when it's merged
- add `.markdownlint.json` config
- remove "allow trailing spaces" for Markdown in `.editorconfig`
- add to `lint` target & create `markdownlint` script in `package.json`,
  which is dumb, but we're stuck with it for now
  • Loading branch information
boneskull committed Dec 29, 2017
1 parent 6c95e34 commit 564b681
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ indent_size = 2

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"no-inline-html": false,
"line-length": false,
"no-trailing-punctuation": false,
"no-duplicate-header": false,
"first-header-h1": false,
"first-line-h1": false,
"commands-show-output": false
}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ clean:
lint:
@printf "==> [Test :: Lint]\n"
npm run lint
npm run markdownlint

test-node: test-bdd test-tdd test-qunit test-exports test-unit test-integration test-jsapi test-compilers test-requires test-reporters test-only test-global-only

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ title: 'Mocha - the fun, simple, flexible JavaScript test framework'
Mocha is a feature-rich JavaScript test framework running on [Node.js](https://nodejs.org) and in the browser, making asynchronous testing *simple* and *fun*. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on [GitHub](https://github.com/mochajs/mocha).

<nav class="badges">
[![Gitter](/images/join-chat.svg)](https://gitter.im/mochajs/mocha)
[![OpenCollective](//opencollective.com/mochajs/backers/badge.svg)](#backers)
[![OpenCollective](//opencollective.com/mochajs/sponsors/badge.svg)](#sponsors)
<a href="https://gitter.im/mochajs/mocha"><img src="/images/join-chat.svg" alt="Gitter"></a>
<a href="#backers"><img src="//opencollective.com/mochajs/backers/badge.svg" alt="OpenCollective backers"></a>
<a href="#sponsors"><img src="//opencollective.com/mochajs/sponsors/badge.svg" alt="OpenCollective sponsors"></a>
</nav>

{% include backers.md %}
Expand Down
139 changes: 139 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
},
"scripts": {
"lint": "eslint . bin/*",
"markdownlint": "markdownlint \"*.md\" \"docs/**/*.md\" \".github/*.md\"",
"test": "make clean && make test",
"prepublishOnly": "npm test && make clean && make mocha.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
Expand All @@ -322,6 +323,7 @@
"supports-color": "4.4.0"
},
"devDependencies": {
"@mocha/markdownlint-cli": "^1.0.0",
"assert": "^1.4.1",
"assetgraph-builder": "^5.6.4",
"browserify": "^14.4.0",
Expand Down

0 comments on commit 564b681

Please sign in to comment.