Skip to content

Commit

Permalink
Add example for running remark with lint plugin
Browse files Browse the repository at this point in the history
* Specifies that using remarkrc lint plugin does not
  require -u flag.

Closes GH-43.
Closes GH-44.
  • Loading branch information
pcgilday authored and wooorm committed Feb 3, 2016
1 parent 515e31e commit 34d19b4
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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,
Expand Down

0 comments on commit 34d19b4

Please sign in to comment.