markdownlint
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -238,7 +238,8 @@ "use strict"; | ||
errors.addDetailIf = | ||
function addDetailIf(lineNumber, expected, actual, range) { | ||
function addDetailIf(lineNumber, expected, actual, detail, range) { | ||
if (expected !== actual) { | ||
addError( | ||
lineNumber, | ||
"Expected: " + expected + "; Actual: " + actual, | ||
"Expected: " + expected + "; Actual: " + actual + | ||
(detail ? "; " + detail : ""), | ||
null, | ||
@@ -245,0 +246,0 @@ range); |
@@ -11,3 +11,3 @@ "use strict"; | ||
var dollarCommandRe = /^(\s*)(\$\s)/; | ||
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))|(?:\[[^\]]*])/; | ||
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))/; | ||
var htmlRe = /<[^>]*>/; | ||
@@ -756,3 +756,4 @@ var listItemMarkerRe = /^[\s>]*(?:[*+-]|\d+\.)\s+/; | ||
errors.addDetailIf(item.lineNumber, | ||
String(number), !match || match[1]); | ||
String(number), !match || match[1], | ||
"Style: " + (style === "one" ? "1/1/1" : "1/2/3")); | ||
if (style === "ordered") { | ||
@@ -1118,3 +1119,3 @@ number++; | ||
if (emptyLink) { | ||
errors.addContext(child.lineNumber, "[" + linkText + "]"); | ||
errors.addContext(child.lineNumber, "[" + linkText + "]()"); | ||
} | ||
@@ -1193,3 +1194,3 @@ } else if (inLink) { | ||
var range = [ match.index + 1, wordMatch.length ]; | ||
errors.addDetailIf(lineNumber, name, match[1], range); | ||
errors.addDetailIf(lineNumber, name, match[1], null, range); | ||
} | ||
@@ -1196,0 +1197,0 @@ } |
{ | ||
"name": "markdownlint", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.", | ||
@@ -22,3 +22,3 @@ "main": "lib/markdownlint.js", | ||
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && cpy file-header.js . --rename=markdownlint-browser.js && browserify browser-polyfills.js ../lib/markdownlint.js --standalone markdownlint >> markdownlint-browser.js && uglifyjs markdownlint-browser.js --compress --mangle --comments --output markdownlint-browser.min.js", | ||
"build-example": "npm install --ignore-scripts grunt grunt-cli gulp through2", | ||
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2", | ||
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint" | ||
@@ -32,3 +32,3 @@ }, | ||
"cpy-cli": "^1.0.1", | ||
"eslint": "^4.10.0", | ||
"eslint": "^4.11.0", | ||
"glob": "^7.1.2", | ||
@@ -40,3 +40,3 @@ "istanbul": "^0.4.5", | ||
"tv4": "^1.3.0", | ||
"uglify-js": "^3.1.8" | ||
"uglify-js": "^3.1.10" | ||
}, | ||
@@ -46,5 +46,5 @@ "keywords": [ | ||
"lint", | ||
"markdownlint", | ||
"md", | ||
"validate" | ||
"CommonMark", | ||
"markdownlint" | ||
], | ||
@@ -51,0 +51,0 @@ "browser": { |
@@ -615,2 +615,14 @@ # markdownlint | ||
## Examples | ||
For ideas how to integrate `markdownlint` into your workflow, refer to the following projects: | ||
* [ally.js](https://allyjs.io/) ([Search repository](https://github.com/medialize/ally.js/search?q=markdownlint)) | ||
* [ESLint](https://eslint.org/) ([Search repository](https://github.com/eslint/eslint/search?q=markdownlint)) | ||
* [Reactable](https://glittershark.github.io/reactable/) ([Search repository](https://github.com/glittershark/reactable/search?q=markdownlint)) | ||
* [Sinon.JS](http://sinonjs.org/) ([Search repository](https://github.com/sinonjs/sinon/search?q=markdownlint)) | ||
* [sonarwhal](https://sonarwhal.com/) ([Search repository](https://github.com/sonarwhal/sonarwhal/search?q=markdownlint)) | ||
* [TestCafe](https://devexpress.github.io/testcafe/) ([Search repository](https://github.com/DevExpress/testcafe/search?q=markdownlint)) | ||
* [webpack](https://webpack.js.org/) ([Search repository](https://github.com/webpack/webpack.js.org/search?q=markdownlint)) | ||
## History | ||
@@ -641,2 +653,3 @@ | ||
* 0.6.3 - Improve highlighting for MD020. | ||
* 0.6.4 - Improve MD029/MD042, update dependencies. | ||
@@ -643,0 +656,0 @@ [npm-image]: https://img.shields.io/npm/v/markdownlint.svg |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164409
3399
664