remark-lint-no-heading-like-paragraph
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "remark-lint-no-heading-like-paragraph", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "remark-lint rule to for too many hashes (h7+ “headings”)", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,13 +7,12 @@ <!--This file is generated--> | ||
## Install | ||
## Presets | ||
```sh | ||
npm install --save remark-lint-no-heading-like-paragraph | ||
``` | ||
This rule is not included in any default preset | ||
## Example | ||
When this rule is turned on, the following file | ||
`valid.md` is ok: | ||
##### `valid.md` | ||
###### In | ||
```markdown | ||
@@ -25,5 +24,10 @@ ###### Alpha | ||
When this rule is turned on, the following file | ||
`invalid.md` is **not** ok: | ||
###### Out | ||
No messages. | ||
##### `invalid.md` | ||
###### In | ||
```markdown | ||
@@ -35,2 +39,4 @@ ####### Charlie | ||
###### Out | ||
```text | ||
@@ -40,4 +46,47 @@ 1:1-1:16: This looks like a heading but has too many hashes | ||
## Install | ||
```sh | ||
npm install remark-lint-no-heading-like-paragraph | ||
``` | ||
## Usage | ||
You probably want to use it on the CLI through a config file: | ||
```diff | ||
... | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
"lint", | ||
+ "lint-no-heading-like-paragraph", | ||
... | ||
] | ||
} | ||
... | ||
``` | ||
Or use it on the CLI directly | ||
```sh | ||
remark -u lint -u lint-no-heading-like-paragraph 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-heading-like-paragraph')) | ||
.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) |
3125
89