remark-lint-no-heading-indent
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
@@ -11,4 +11,2 @@ /** | ||
* | ||
* <!-- Note: the middle-dots represent spaces --> | ||
* | ||
* #·Hello world | ||
@@ -26,4 +24,2 @@ * | ||
* | ||
* <!-- Note: the middle-dots represent spaces --> | ||
* | ||
* ···# Hello world | ||
@@ -41,6 +37,6 @@ * | ||
* | ||
* 3:4: Remove 3 spaces before this heading | ||
* 5:2: Remove 1 space before this heading | ||
* 8:2: Remove 1 space before this heading | ||
* 10:4: Remove 3 spaces before this heading | ||
* 1:4: Remove 3 spaces before this heading | ||
* 3:2: Remove 1 space before this heading | ||
* 6:2: Remove 1 space before this heading | ||
* 8:4: Remove 3 spaces before this heading | ||
*/ | ||
@@ -47,0 +43,0 @@ |
{ | ||
"name": "remark-lint-no-heading-indent", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "remark-lint rule to warn when headings are indented", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,16 +7,15 @@ <!--This file is generated--> | ||
## Install | ||
## Presets | ||
```sh | ||
npm install --save remark-lint-no-heading-indent | ||
``` | ||
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 | ||
Note: `·` represents a space. | ||
```markdown | ||
<!-- Note: the middle-dots represent spaces --> | ||
#·Hello world | ||
@@ -33,8 +32,13 @@ | ||
When this rule is turned on, the following file | ||
`invalid.md` is **not** ok: | ||
###### Out | ||
No messages. | ||
##### `invalid.md` | ||
###### In | ||
Note: `·` represents a space. | ||
```markdown | ||
<!-- Note: the middle-dots represent spaces --> | ||
···# Hello world | ||
@@ -51,11 +55,56 @@ | ||
###### Out | ||
```text | ||
3:4: Remove 3 spaces before this heading | ||
5:2: Remove 1 space before this heading | ||
8:2: Remove 1 space before this heading | ||
10:4: Remove 3 spaces before this heading | ||
1:4: Remove 3 spaces before this heading | ||
3:2: Remove 1 space before this heading | ||
6:2: Remove 1 space before this heading | ||
8:4: Remove 3 spaces before this heading | ||
``` | ||
## Install | ||
```sh | ||
npm install remark-lint-no-heading-indent | ||
``` | ||
## Usage | ||
You probably want to use it on the CLI through a config file: | ||
```diff | ||
... | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
"lint", | ||
+ "lint-no-heading-indent", | ||
... | ||
] | ||
} | ||
... | ||
``` | ||
Or use it on the CLI directly | ||
```sh | ||
remark -u lint -u lint-no-heading-indent 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-indent')) | ||
.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
4060
108
79