Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-markdown

Package Overview
Dependencies
Maintainers
9
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-markdown - npm Package Compare versions

Comparing version 1.0.0-beta.6 to 1.0.0-beta.7

7

CHANGELOG.md

@@ -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 @@

9

lib/processor.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc