From 34d19b4f2494a7f19c0bfe2a587ecd22904b6919 Mon Sep 17 00:00:00 2001 From: Patrick Gilday Date: Wed, 3 Feb 2016 15:15:52 -0500 Subject: [PATCH] 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. --- readme.md | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 0121d076..6b06da70 100644 --- a/readme.md +++ b/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,