mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-09-11 19:57:15 +03:00
Add list of external rules to readme.md
This commit is contained in:
parent
d78b63ac94
commit
298b33ae64
174
doc/rules.md
174
doc/rules.md
@ -4,6 +4,8 @@ This document describes all available rules, what they
|
||||
check for, examples of what they warn for, and how to
|
||||
fix their warnings.
|
||||
|
||||
See the readme for a [list of external rules](https://github.com/wooorm/remark-lint#list-of-external-rules).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Rules](#rules)
|
||||
@ -75,12 +77,12 @@ be null or undefined in order to be ignored.
|
||||
### externals
|
||||
|
||||
````md
|
||||
<!-- Load more rules -->
|
||||
```json
|
||||
{
|
||||
"externals": ["foo", "bar", "baz"]
|
||||
}
|
||||
```
|
||||
<!-- Load more rules -->
|
||||
```json
|
||||
{
|
||||
"externals": ["foo", "bar", "baz"]
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
Externals contains a list of extra rules to load.
|
||||
@ -92,13 +94,13 @@ name or a file), but in the browser an object must be passed in.
|
||||
### reset
|
||||
|
||||
````md
|
||||
<!-- Explicitly activate rules: -->
|
||||
```json
|
||||
{
|
||||
"reset": true,
|
||||
"final-newline": true
|
||||
}
|
||||
```
|
||||
<!-- Explicitly activate rules: -->
|
||||
```json
|
||||
{
|
||||
"reset": true,
|
||||
"final-newline": true
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
By default, all rules are turned on unless explicitly set to `false`.
|
||||
@ -197,28 +199,28 @@ Options: `boolean`, default: `false`.
|
||||
### code-block-style
|
||||
|
||||
````md
|
||||
<!-- Valid, when set to `indented` or `consistent`, invalid when set to `fenced` -->
|
||||
Hello
|
||||
<!-- Valid, when set to `indented` or `consistent`, invalid when set to `fenced` -->
|
||||
Hello
|
||||
|
||||
...
|
||||
...
|
||||
|
||||
World
|
||||
World
|
||||
|
||||
<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
|
||||
```
|
||||
<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
|
||||
```
|
||||
Hello
|
||||
```
|
||||
...
|
||||
```bar
|
||||
World
|
||||
```
|
||||
|
||||
<!-- Always invalid -->
|
||||
Hello
|
||||
```
|
||||
...
|
||||
```bar
|
||||
World
|
||||
```
|
||||
|
||||
<!-- Always invalid -->
|
||||
Hello
|
||||
...
|
||||
```
|
||||
World
|
||||
```
|
||||
...
|
||||
```
|
||||
World
|
||||
```
|
||||
````
|
||||
|
||||
Warn when code-blocks do not adhere to a given style.
|
||||
@ -278,28 +280,28 @@ Options: `boolean`, default: `false`.
|
||||
### fenced-code-flag
|
||||
|
||||
````md
|
||||
<!-- Valid: -->
|
||||
```hello
|
||||
world();
|
||||
```
|
||||
<!-- Valid: -->
|
||||
```hello
|
||||
world();
|
||||
```
|
||||
|
||||
<!-- Valid: -->
|
||||
Hello
|
||||
<!-- Valid: -->
|
||||
Hello
|
||||
|
||||
<!-- Invalid: -->
|
||||
```
|
||||
world();
|
||||
```
|
||||
<!-- Invalid: -->
|
||||
```
|
||||
world();
|
||||
```
|
||||
|
||||
<!-- Valid when given `{allowEmpty: true}`: -->
|
||||
```
|
||||
world();
|
||||
```
|
||||
<!-- Valid when given `{allowEmpty: true}`: -->
|
||||
```
|
||||
world();
|
||||
```
|
||||
|
||||
<!-- Invalid when given `["world"]`: -->
|
||||
```hello
|
||||
world();
|
||||
```
|
||||
<!-- Invalid when given `["world"]`: -->
|
||||
```hello
|
||||
world();
|
||||
```
|
||||
````
|
||||
|
||||
Warn when fenced code blocks occur without language flag.
|
||||
@ -317,32 +319,32 @@ Options: `boolean`, default: `false`.
|
||||
### fenced-code-marker
|
||||
|
||||
````md
|
||||
<!-- Valid by default and `` '`' ``: -->
|
||||
```foo
|
||||
bar();
|
||||
```
|
||||
<!-- Valid by default and `` '`' ``: -->
|
||||
```foo
|
||||
bar();
|
||||
```
|
||||
|
||||
```
|
||||
baz();
|
||||
```
|
||||
```
|
||||
baz();
|
||||
```
|
||||
|
||||
<!-- Valid by default and `'~'`: -->
|
||||
~~~foo
|
||||
bar();
|
||||
~~~
|
||||
<!-- Valid by default and `'~'`: -->
|
||||
~~~foo
|
||||
bar();
|
||||
~~~
|
||||
|
||||
~~~
|
||||
baz();
|
||||
~~~
|
||||
~~~
|
||||
baz();
|
||||
~~~
|
||||
|
||||
<!-- Always invalid: -->
|
||||
~~~foo
|
||||
bar();
|
||||
~~~
|
||||
<!-- Always invalid: -->
|
||||
~~~foo
|
||||
bar();
|
||||
~~~
|
||||
|
||||
```
|
||||
baz();
|
||||
```
|
||||
```
|
||||
baz();
|
||||
```
|
||||
````
|
||||
|
||||
Warn for violating fenced code markers.
|
||||
@ -962,24 +964,24 @@ Options: `boolean`, default: `false`.
|
||||
### no-shell-dollars
|
||||
|
||||
````md
|
||||
<!-- Invalid: -->
|
||||
```bash
|
||||
$ echo a
|
||||
$ echo a > file
|
||||
```
|
||||
<!-- Invalid: -->
|
||||
```bash
|
||||
$ echo a
|
||||
$ echo a > file
|
||||
```
|
||||
|
||||
<!-- Valid: -->
|
||||
```sh
|
||||
echo a
|
||||
echo a > file
|
||||
```
|
||||
<!-- Valid: -->
|
||||
```sh
|
||||
echo a
|
||||
echo a > file
|
||||
```
|
||||
|
||||
<!-- Also valid: -->
|
||||
```zsh
|
||||
$ echo a
|
||||
a
|
||||
$ echo a > file
|
||||
```
|
||||
<!-- Also valid: -->
|
||||
```zsh
|
||||
$ echo a
|
||||
a
|
||||
$ echo a > file
|
||||
```
|
||||
````
|
||||
|
||||
Warn when shell code is prefixed by dollar-characters.
|
||||
|
25
readme.md
25
readme.md
@ -22,6 +22,7 @@ a powerful markdown processor powered by [plugins](https://github.com/wooorm/rem
|
||||
* [Configuring remark-lint](#configuring-remark-lint)
|
||||
* [Using remark to fix your markdown](#using-remark-to-fix-your-markdown)
|
||||
* [Editor Integrations](#editor-integrations)
|
||||
* [List of External Rules](#list-of-external-rules)
|
||||
* [Related](#related)
|
||||
* [License](#license)
|
||||
|
||||
@ -157,13 +158,33 @@ and I strongly suggest checking out how it can make your life easier :+1:
|
||||
|
||||
## Editor Integrations
|
||||
|
||||
Currently, **remark-lint** is integrated with Atom through [**leipert/linter-markdown**](https://atom.io/packages/linter-markdown).
|
||||
Currently, **remark-lint** is integrated with Atom through [**linter-markdown**](https://atom.io/packages/linter-markdown).
|
||||
|
||||
I’m very interested in more integrations. Let me know if I can help.
|
||||
|
||||
## List of External Rules
|
||||
|
||||
* [`chcokr/mdast-lint-sentence-newline`](https://github.com/chcokr/mdast-lint-sentence-newline)
|
||||
— Ensure sentences are followed by a newline;
|
||||
|
||||
* [`vhf/remark-lint-alphabetize-lists`](https://github.com/vhf/remark-lint-alphabetize-lists)
|
||||
— Ensure list items are in alphabetical order;
|
||||
|
||||
* [`vhf/remark-lint-blank-lines-1-0-2`](https://github.com/vhf/remark-lint-blank-lines-1-0-2)
|
||||
— Ensure a specific number of lines between blocks;
|
||||
|
||||
* [`vhf/remark-lint-books-links`](https://github.com/vhf/remark-lint-books-links)
|
||||
— Ensure links in lists of books follow a standard format;
|
||||
|
||||
* [`vhf/remark-lint-no-empty-sections`](https://github.com/vhf/remark-lint-no-empty-sections)
|
||||
— Ensure every heading is followed by content (forming a section);
|
||||
|
||||
* [`vhf/remark-lint-no-url-trailing-slash`](https://github.com/vhf/remark-lint-no-url-trailing-slash)
|
||||
— Ensure that the `href` of links has no trailing slash.
|
||||
|
||||
## Related
|
||||
|
||||
* [`remark-validate-links`](https://github.com/wooorm/remark-validate-links)
|
||||
* [`wooorm/remark-validate-links`](https://github.com/wooorm/remark-validate-links)
|
||||
— Validate if links point to existing headings and files in markdown.
|
||||
|
||||
## License
|
||||
|
@ -70,15 +70,38 @@ children.push({
|
||||
* Add main description.
|
||||
*/
|
||||
|
||||
children.push({
|
||||
'type': 'paragraph',
|
||||
'children': [{
|
||||
'type': 'text',
|
||||
'value': 'This document describes all available rules, what they\n' +
|
||||
'check for, examples of what they warn for, and how to\n' +
|
||||
'fix their warnings.'
|
||||
}]
|
||||
});
|
||||
children.push(
|
||||
{
|
||||
'type': 'paragraph',
|
||||
'children': [{
|
||||
'type': 'text',
|
||||
'value': 'This document describes all available rules, what they\n' +
|
||||
'check for, examples of what they warn for, and how to\n' +
|
||||
'fix their warnings.'
|
||||
}]
|
||||
},
|
||||
{
|
||||
'type': 'paragraph',
|
||||
'children': [
|
||||
{
|
||||
'type': 'text',
|
||||
'value': 'See the readme for a '
|
||||
},
|
||||
{
|
||||
'type': 'link',
|
||||
'href': 'https://github.com/wooorm/remark-lint#list-of-external-rules',
|
||||
'children': [{
|
||||
'type': 'text',
|
||||
'value': 'list of external rules'
|
||||
}]
|
||||
},
|
||||
{
|
||||
'type': 'text',
|
||||
'value': '.'
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
/*
|
||||
* Add the table-of-contents heading.
|
||||
|
Loading…
Reference in New Issue
Block a user