eslint-plugin-markdown
Advanced tools
Comparing version 1.0.0-beta.6 to 1.0.0-beta.7
@@ -0,1 +1,8 @@ | ||
v1.0.0-beta.7 - July 2, 2017 | ||
* f8ba18a New: Custom eslint-skip HTML comment skips blocks (fixes #69) (#73) (Brandon Mills) | ||
* 249904f Chore: Add test for code fences without blank lines (#72) (Brandon Mills) | ||
* 3abc569 Chore: Un-disable strict and eol-last in repository (#71) (Brandon Mills) | ||
* 132ea5b Chore: Add test ensuring config comments do not fall through (#70) (Brandon Mills) | ||
v1.0.0-beta.6 - April 29, 2017 | ||
@@ -2,0 +9,0 @@ |
@@ -65,3 +65,3 @@ /** | ||
return "/*" + html + "*/"; | ||
return html; | ||
} | ||
@@ -92,3 +92,8 @@ | ||
} | ||
comments.unshift(comment); | ||
if (comment.trim() === "eslint-skip") { | ||
return; | ||
} | ||
comments.unshift("/*" + comment + "*/"); | ||
index--; | ||
@@ -95,0 +100,0 @@ previousNode = parent.children[index]; |
{ | ||
"name": "eslint-plugin-markdown", | ||
"version": "1.0.0-beta.6", | ||
"version": "1.0.0-beta.7", | ||
"description": "An ESLint plugin to lint JavaScript in Markdown code fences.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -105,2 +105,22 @@ # eslint-plugin-markdown | ||
## Skipping Blocks | ||
Sometimes it can be useful to have code blocks marked with `js` even though they don't contain valid JavaScript syntax, such as commented JSON blobs that need `js` syntax highlighting. Standard `eslint-disable` comments only silence rule reporting, but ESLint still reports any syntax errors it finds. In cases where a code block should not even be parsed, insert a non-standard `<!-- eslint-skip -->` comment before the block, and this plugin will hide the following block from ESLint. Neither rule nor syntax errors will be reported. | ||
There are comments in this JSON, so we use `js` syntax for better | ||
highlighting. Skip the block to prevent warnings about invalid syntax. | ||
<!-- eslint-skip --> | ||
```js | ||
{ | ||
// This code block is hidden from ESLint. | ||
"hello": "world" | ||
} | ||
``` | ||
```js | ||
console.log("This code block is linted normally."); | ||
``` | ||
## Unsatisfiable Rules | ||
@@ -107,0 +127,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12633
157
141
0