remark-lint-no-consecutive-blank-lines
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
@@ -13,3 +13,3 @@ /** | ||
* Foo... | ||
* | ||
* ␊ | ||
* ...Bar. | ||
@@ -22,4 +22,4 @@ * | ||
* * List | ||
* | ||
* | ||
* ␊ | ||
* ␊ | ||
* bravo(); | ||
@@ -30,4 +30,4 @@ * | ||
* Foo... | ||
* | ||
* | ||
* ␊ | ||
* ␊ | ||
* ...Bar. | ||
@@ -96,4 +96,2 @@ * | ||
return; | ||
/* Compare the difference between `start` and `end`, | ||
@@ -100,0 +98,0 @@ * and warn when that difference exceeds `max`. */ |
{ | ||
"name": "remark-lint-no-consecutive-blank-lines", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "remark-lint rule to warn for too many consecutive blank lines", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -8,22 +8,34 @@ <!--This file is generated--> | ||
## Install | ||
## Presets | ||
```sh | ||
npm install --save remark-lint-no-consecutive-blank-lines | ||
``` | ||
This rule is included in the following presets: | ||
| Preset | Setting | | ||
| ------ | ------- | | ||
| [`remark-preset-lint-markdown-style-guide`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | | | ||
## Example | ||
When this rule is turned on, the following file | ||
`valid.md` is ok: | ||
##### `valid.md` | ||
###### In | ||
Note: `␊` represents a line feed. | ||
```markdown | ||
Foo... | ||
␊ | ||
...Bar. | ||
``` | ||
When this rule is turned on, the following file | ||
`valid-for-code.md` is ok: | ||
###### Out | ||
No messages. | ||
##### `valid-for-code.md` | ||
###### In | ||
Note: `␊` represents a line feed. | ||
```markdown | ||
@@ -33,17 +45,26 @@ Paragraph. | ||
* List | ||
␊ | ||
␊ | ||
bravo(); | ||
``` | ||
When this rule is turned on, the following file | ||
`invalid.md` is **not** ok: | ||
###### Out | ||
No messages. | ||
##### `invalid.md` | ||
###### In | ||
Note: `␊` represents a line feed. | ||
```markdown | ||
Foo... | ||
␊ | ||
␊ | ||
...Bar. | ||
``` | ||
###### Out | ||
```text | ||
@@ -53,4 +74,47 @@ 4:1: Remove 1 line before node | ||
## Install | ||
```sh | ||
npm install remark-lint-no-consecutive-blank-lines | ||
``` | ||
## Usage | ||
You probably want to use it on the CLI through a config file: | ||
```diff | ||
... | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
"lint", | ||
+ "lint-no-consecutive-blank-lines", | ||
... | ||
] | ||
} | ||
... | ||
``` | ||
Or use it on the CLI directly | ||
```sh | ||
remark -u lint -u lint-no-consecutive-blank-lines readme.md | ||
``` | ||
Or use this on the API: | ||
```diff | ||
var remark = require('remark'); | ||
var report = require('vfile-reporter'); | ||
remark() | ||
.use(require('remark-lint')) | ||
+ .use(require('remark-lint-no-consecutive-blank-lines')) | ||
.process('_Emphasis_ and **importance**', function (err, file) { | ||
console.error(report(err || file)); | ||
}); | ||
``` | ||
## License | ||
[MIT](https://github.com/wooorm/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com) |
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
5063
118
88