remark-lint-ordered-list-marker-value
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,4 +10,3 @@ /** | ||
* | ||
* Options: `string`, either `'single'`, `'one'`, or `'ordered'`, | ||
* default: `'ordered'`. | ||
* Options: `'single'`, `'one'`, or `'ordered'`, default: `'ordered'`. | ||
* | ||
@@ -14,0 +13,0 @@ * When set to `'ordered'`, list-item bullets should increment by one, |
{ | ||
"name": "remark-lint-ordered-list-marker-value", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "remark-lint rule to warn when the marker value of ordered lists violates a given style", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
122
readme.md
@@ -8,4 +8,3 @@ <!--This file is generated--> | ||
Options: `string`, either `'single'`, `'one'`, or `'ordered'`, | ||
default: `'ordered'`. | ||
Options: `'single'`, `'one'`, or `'ordered'`, default: `'ordered'`. | ||
@@ -17,13 +16,16 @@ When set to `'ordered'`, list-item bullets should increment by one, | ||
## Install | ||
## Presets | ||
```sh | ||
npm install --save remark-lint-ordered-list-marker-value | ||
``` | ||
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 | ||
```markdown | ||
@@ -48,5 +50,12 @@ The default value is `ordered`, so unless changed, the below | ||
When this rule is `'one'`, the following file | ||
`valid.md` is ok: | ||
###### Out | ||
No messages. | ||
##### `valid.md` | ||
When configured with `'one'`. | ||
###### In | ||
```markdown | ||
@@ -64,5 +73,12 @@ 1. Foo | ||
When this rule is `'one'`, the following file | ||
`invalid.md` is **not** ok: | ||
###### Out | ||
No messages. | ||
##### `invalid.md` | ||
When configured with `'one'`. | ||
###### In | ||
```markdown | ||
@@ -73,2 +89,4 @@ 1. Foo | ||
###### Out | ||
```text | ||
@@ -78,5 +96,8 @@ 2:1-2:8: Marker should be `1`, was `2` | ||
When this rule is `'single'`, the following file | ||
`valid.md` is ok: | ||
##### `valid.md` | ||
When configured with `'single'`. | ||
###### In | ||
```markdown | ||
@@ -94,5 +115,12 @@ 1. Foo | ||
When this rule is `'ordered'`, the following file | ||
`valid.md` is ok: | ||
###### Out | ||
No messages. | ||
##### `valid.md` | ||
When configured with `'ordered'`. | ||
###### In | ||
```markdown | ||
@@ -110,5 +138,12 @@ 1. Foo | ||
When this rule is `'ordered'`, the following file | ||
`invalid.md` is **not** ok: | ||
###### Out | ||
No messages. | ||
##### `invalid.md` | ||
When configured with `'ordered'`. | ||
###### In | ||
```markdown | ||
@@ -119,2 +154,4 @@ 1. Foo | ||
###### Out | ||
```text | ||
@@ -124,4 +161,8 @@ 2:1-2:8: Marker should be `2`, was `1` | ||
When `'invalid'` is passed in, the following error is given: | ||
##### `invalid.md` | ||
When configured with `'invalid'`. | ||
###### Out | ||
```text | ||
@@ -131,4 +172,47 @@ 1:1: Invalid ordered list-item marker value `invalid`: use either `'ordered'` or `'one'` | ||
## Install | ||
```sh | ||
npm install remark-lint-ordered-list-marker-value | ||
``` | ||
## Usage | ||
You probably want to use it on the CLI through a config file: | ||
```diff | ||
... | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
"lint", | ||
+ "lint-ordered-list-marker-value", | ||
... | ||
] | ||
} | ||
... | ||
``` | ||
Or use it on the CLI directly | ||
```sh | ||
remark -u lint -u lint-ordered-list-marker-value 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-ordered-list-marker-value')) | ||
.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
7461
208
147