diff --git a/.editorconfig b/.editorconfig index e3a4859eeb..47ce1a5519 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,6 +13,3 @@ indent_size = 2 [Makefile] indent_style = tab - -[*.md] -trim_trailing_whitespace = false diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000000..47743fd9b0 --- /dev/null +++ b/.markdownlint.json @@ -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 +} diff --git a/Makefile b/Makefile index 7567fc16a0..7d7958ea8d 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/package-lock.json b/package-lock.json index 62feb3cc60..c632a3b489 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,46 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@mocha/markdownlint-cli": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@mocha/markdownlint-cli/-/markdownlint-cli-1.0.0.tgz", + "integrity": "sha512-ziYMBeFh3KlAAZUOrunYTtjgb6J4K8u5dDVUIjG9JTe+pHhQUd1UQaBo+WKY6XCoUJhSi5QhlPEDzLL63qWYPg==", + "dev": true, + "requires": { + "commander": "2.9.0", + "deep-extend": "0.4.2", + "glob": "7.0.6", + "lodash.flatten": "4.3.0", + "lodash.values": "4.2.0", + "markdownlint": "0.6.4", + "rc": "1.1.7" + }, + "dependencies": { + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, "JSONStream": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", @@ -4294,46 +4334,6 @@ "markdown-it": "8.3.2" } }, - "markdownlint-cli": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.5.0.tgz", - "integrity": "sha512-h/kimM0C1YIvFtFpgFDJPD208SW/f96/V/Tf2Oxk7gIBzDJ0sxeg6qX8uyn07ka8wH/QDw4FmWO2/HkyLcLjyQ==", - "dev": true, - "requires": { - "commander": "2.9.0", - "deep-extend": "0.4.2", - "glob": "7.0.6", - "lodash.flatten": "4.3.0", - "lodash.values": "4.2.0", - "markdownlint": "0.6.4", - "rc": "1.1.7" - }, - "dependencies": { - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": "1.0.1" - } - }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } - } - }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", diff --git a/package.json b/package.json index 0f7adb6d27..e9b27b64b3 100644 --- a/package.json +++ b/package.json @@ -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", @@ -321,6 +322,7 @@ "supports-color": "4.4.0" }, "devDependencies": { + "@mocha/markdownlint-cli": "^1.0.0", "assert": "^1.4.1", "browserify": "^14.4.0", "buffer": "^4.9.1", @@ -344,7 +346,6 @@ "karma-phantomjs-launcher": "^1.0.4", "karma-sauce-launcher": "^1.2.0", "markdown-toc": "^1.2.0", - "markdownlint-cli": "^0.5.0", "nyc": "^11.2.1", "rimraf": "^2.5.2", "through2": "^2.0.1",