Skip to content

Commit 564b681

Browse files
committed
add @mocha/markdownlint-cli; closes #3172
- 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
1 parent 6c95e34 commit 564b681

File tree

6 files changed

+154
-6
lines changed

6 files changed

+154
-6
lines changed

.editorconfig

-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@ indent_size = 2
1313

1414
[Makefile]
1515
indent_style = tab
16-
17-
[*.md]
18-
trim_trailing_whitespace = false

.markdownlint.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"no-inline-html": false,
3+
"line-length": false,
4+
"no-trailing-punctuation": false,
5+
"no-duplicate-header": false,
6+
"first-header-h1": false,
7+
"first-line-h1": false,
8+
"commands-show-output": false
9+
}

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ clean:
3535
lint:
3636
@printf "==> [Test :: Lint]\n"
3737
npm run lint
38+
npm run markdownlint
3839

3940
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
4041

docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ title: 'Mocha - the fun, simple, flexible JavaScript test framework'
55
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).
66

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

1313
{% include backers.md %}

package-lock.json

+139
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
},
301301
"scripts": {
302302
"lint": "eslint . bin/*",
303+
"markdownlint": "markdownlint \"*.md\" \"docs/**/*.md\" \".github/*.md\"",
303304
"test": "make clean && make test",
304305
"prepublishOnly": "npm test && make clean && make mocha.js",
305306
"coveralls": "nyc report --reporter=text-lcov | coveralls",
@@ -322,6 +323,7 @@
322323
"supports-color": "4.4.0"
323324
},
324325
"devDependencies": {
326+
"@mocha/markdownlint-cli": "^1.0.0",
325327
"assert": "^1.4.1",
326328
"assetgraph-builder": "^5.6.4",
327329
"browserify": "^14.4.0",

0 commit comments

Comments
 (0)