mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-09-11 19:57:15 +03:00
Add example for running remark with lint plugin
* Specifies that using remarkrc lint plugin does not require -u flag. Closes GH-43. Closes GH-44.
This commit is contained in:
parent
515e31e48e
commit
34d19b4f24
37
readme.md
37
readme.md
@ -96,10 +96,9 @@ An example `.remarkrc` file could look as follows:
|
||||
{
|
||||
"plugins": {
|
||||
"lint": {
|
||||
"no-multiple-toplevel-headings": false,
|
||||
"maximum-line-length": 79,
|
||||
"emphasis-marker": "_",
|
||||
"strong-marker": "*"
|
||||
"no-multiple-toplevel-headings": false,
|
||||
"list-item-indent": false,
|
||||
"maximum-line-length": 79
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
@ -108,10 +107,32 @@ An example `.remarkrc` file could look as follows:
|
||||
}
|
||||
```
|
||||
|
||||
Where the object at `plugins.lint` is a map of `ruleId`s and their values.
|
||||
The object at `settings` determines how **remark** parses (and compiles)
|
||||
markdown code. Read more about the latter on [**remark**’s
|
||||
readme][remark-process].
|
||||
Where the object at `plugins.lint` is a map of `ruleId`s and their values. The
|
||||
object at `settings` determines how **remark** parses (and compiles)
|
||||
markdown code. Read more about the latter on
|
||||
[**remark**’s readme][remark-process].
|
||||
|
||||
Using our `example.md` from before:
|
||||
|
||||
```md
|
||||
* Hello
|
||||
|
||||
[World][]
|
||||
```
|
||||
|
||||
We now run the below command _without_ the `-u remark-lint` since
|
||||
our `.remarkrc` includes the lint plugin.
|
||||
|
||||
```bash
|
||||
remark example.md
|
||||
#
|
||||
# Yields:
|
||||
#
|
||||
# example.md
|
||||
# 3:1-3:10 warning Found reference to undefined definition no-undefined-references
|
||||
#
|
||||
# ⚠ 2 warnings
|
||||
```
|
||||
|
||||
In addition, you can also provide configuration comments to turn a rule
|
||||
on or off inside a file. Note that you cannot change what a setting,
|
||||
|
Loading…
Reference in New Issue
Block a user