Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont require trailing : to enforce semantic headings #48

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
325 changes: 162 additions & 163 deletions doc/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,67 @@ See the readme for a [list of external rules](https://github.com/wooorm/remark-l

## Table of Contents

* [Rules](#rules)

* [external](#external)
* [reset](#reset)
* [blockquote-indentation](#blockquote-indentation)
* [checkbox-character-style](#checkbox-character-style)
* [checkbox-content-indent](#checkbox-content-indent)
* [code-block-style](#code-block-style)
* [definition-case](#definition-case)
* [definition-spacing](#definition-spacing)
* [emphasis-marker](#emphasis-marker)
* [fenced-code-flag](#fenced-code-flag)
* [fenced-code-marker](#fenced-code-marker)
* [file-extension](#file-extension)
* [final-definition](#final-definition)
* [final-newline](#final-newline)
* [first-heading-level](#first-heading-level)
* [hard-break-spaces](#hard-break-spaces)
* [heading-increment](#heading-increment)
* [heading-style](#heading-style)
* [link-title-style](#link-title-style)
* [list-item-bullet-indent](#list-item-bullet-indent)
* [list-item-content-indent](#list-item-content-indent)
* [list-item-indent](#list-item-indent)
* [list-item-spacing](#list-item-spacing)
* [maximum-heading-length](#maximum-heading-length)
* [maximum-line-length](#maximum-line-length)
* [no-auto-link-without-protocol](#no-auto-link-without-protocol)
* [no-blockquote-without-caret](#no-blockquote-without-caret)
* [no-consecutive-blank-lines](#no-consecutive-blank-lines)
* [no-duplicate-definitions](#no-duplicate-definitions)
* [no-duplicate-headings](#no-duplicate-headings)
* [no-emphasis-as-heading](#no-emphasis-as-heading)
* [no-file-name-articles](#no-file-name-articles)
* [no-file-name-consecutive-dashes](#no-file-name-consecutive-dashes)
* [no-file-name-irregular-characters](#no-file-name-irregular-characters)
* [no-file-name-mixed-case](#no-file-name-mixed-case)
* [no-file-name-outer-dashes](#no-file-name-outer-dashes)
* [no-heading-content-indent](#no-heading-content-indent)
* [no-heading-indent](#no-heading-indent)
* [no-heading-punctuation](#no-heading-punctuation)
* [no-html](#no-html)
* [no-inline-padding](#no-inline-padding)
* [no-literal-urls](#no-literal-urls)
* [no-missing-blank-lines](#no-missing-blank-lines)
* [no-multiple-toplevel-headings](#no-multiple-toplevel-headings)
* [no-shell-dollars](#no-shell-dollars)
* [no-shortcut-reference-image](#no-shortcut-reference-image)
* [no-shortcut-reference-link](#no-shortcut-reference-link)
* [no-table-indentation](#no-table-indentation)
* [no-tabs](#no-tabs)
* [no-undefined-references](#no-undefined-references)
* [no-unused-definitions](#no-unused-definitions)
* [ordered-list-marker-style](#ordered-list-marker-style)
* [ordered-list-marker-value](#ordered-list-marker-value)
* [rule-style](#rule-style)
* [strong-marker](#strong-marker)
* [table-cell-padding](#table-cell-padding)
* [table-pipe-alignment](#table-pipe-alignment)
* [table-pipes](#table-pipes)
* [unordered-list-marker-style](#unordered-list-marker-style)
- [Rules](#rules)

- [external](#external)
- [reset](#reset)
- [blockquote-indentation](#blockquote-indentation)
- [checkbox-character-style](#checkbox-character-style)
- [checkbox-content-indent](#checkbox-content-indent)
- [code-block-style](#code-block-style)
- [definition-case](#definition-case)
- [definition-spacing](#definition-spacing)
- [emphasis-marker](#emphasis-marker)
- [fenced-code-flag](#fenced-code-flag)
- [fenced-code-marker](#fenced-code-marker)
- [file-extension](#file-extension)
- [final-definition](#final-definition)
- [final-newline](#final-newline)
- [first-heading-level](#first-heading-level)
- [hard-break-spaces](#hard-break-spaces)
- [heading-increment](#heading-increment)
- [heading-style](#heading-style)
- [link-title-style](#link-title-style)
- [list-item-bullet-indent](#list-item-bullet-indent)
- [list-item-content-indent](#list-item-content-indent)
- [list-item-indent](#list-item-indent)
- [list-item-spacing](#list-item-spacing)
- [maximum-heading-length](#maximum-heading-length)
- [maximum-line-length](#maximum-line-length)
- [no-auto-link-without-protocol](#no-auto-link-without-protocol)
- [no-blockquote-without-caret](#no-blockquote-without-caret)
- [no-consecutive-blank-lines](#no-consecutive-blank-lines)
- [no-duplicate-definitions](#no-duplicate-definitions)
- [no-duplicate-headings](#no-duplicate-headings)
- [no-emphasis-as-heading](#no-emphasis-as-heading)
- [no-file-name-articles](#no-file-name-articles)
- [no-file-name-consecutive-dashes](#no-file-name-consecutive-dashes)
- [no-file-name-irregular-characters](#no-file-name-irregular-characters)
- [no-file-name-mixed-case](#no-file-name-mixed-case)
- [no-file-name-outer-dashes](#no-file-name-outer-dashes)
- [no-heading-content-indent](#no-heading-content-indent)
- [no-heading-indent](#no-heading-indent)
- [no-heading-punctuation](#no-heading-punctuation)
- [no-html](#no-html)
- [no-inline-padding](#no-inline-padding)
- [no-literal-urls](#no-literal-urls)
- [no-missing-blank-lines](#no-missing-blank-lines)
- [no-multiple-toplevel-headings](#no-multiple-toplevel-headings)
- [no-shell-dollars](#no-shell-dollars)
- [no-shortcut-reference-image](#no-shortcut-reference-image)
- [no-shortcut-reference-link](#no-shortcut-reference-link)
- [no-table-indentation](#no-table-indentation)
- [no-tabs](#no-tabs)
- [no-undefined-references](#no-undefined-references)
- [no-unused-definitions](#no-unused-definitions)
- [ordered-list-marker-style](#ordered-list-marker-style)
- [ordered-list-marker-value](#ordered-list-marker-value)
- [rule-style](#rule-style)
- [strong-marker](#strong-marker)
- [table-cell-padding](#table-cell-padding)
- [table-pipe-alignment](#table-pipe-alignment)
- [table-pipes](#table-pipes)
- [unordered-list-marker-style](#unordered-list-marker-style)

## Rules

Expand All @@ -79,12 +79,13 @@ be null or undefined in order to be ignored.
### external

````md
<!-- Load more rules -->
```json
{
"external": ["foo", "bar", "baz"]
}
```
<!-- Load more rules -->
```json
{
"external": ["foo", "bar", "baz"]
}
```

````

External contains a list of extra rules to load.
Expand All @@ -99,13 +100,14 @@ rules are also loaded.
### 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`.
Expand Down Expand Up @@ -204,28 +206,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.
Expand Down Expand Up @@ -285,28 +287,28 @@ Options: `boolean`, default: `false`.
### fenced-code-flag

````md
<!-- Valid: -->
```hello
world();
```

<!-- Valid: -->
Hello

<!-- Invalid: -->
```
world();
```

<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```

<!-- Invalid when given `["world"]`: -->
```hello
world();
```
<!-- Valid: -->
```hello
world();
```

<!-- Valid: -->
Hello

<!-- Invalid: -->
```
world();
```

<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```

<!-- Invalid when given `["world"]`: -->
```hello
world();
```
````

Warn when fenced code blocks occur without language flag.
Expand All @@ -324,32 +326,32 @@ Options: `boolean`, default: `false`.
### fenced-code-marker

````md
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```

```
baz();
```

<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~

~~~
baz();
~~~

<!-- Always invalid: -->
~~~foo
bar();
~~~

```
baz();
```
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```

```
baz();
```

<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~

~~~
baz();
~~~

<!-- Always invalid: -->
~~~foo
bar();
~~~

```
baz();
```
````

Warn for violating fenced code markers.
Expand Down Expand Up @@ -754,22 +756,19 @@ Options: `boolean`, default: `false`.

```md
<!-- Valid: -->
# Foo:
# Foo

Bar.

<!-- Invalid: -->
*Foo:*
*Foo*

Bar.
```

Warn when emphasis (including strong), instead of a heading, introduces
a paragraph.

Currently, only warns when a colon (`:`) is also included, maybe that
could be omitted.

### no-file-name-articles

```md
Expand Down Expand Up @@ -969,24 +968,24 @@ Options: `boolean`, default: `false`.
### no-shell-dollars

````md
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```

<!-- Valid: -->
```sh
echo a
echo a > file
```

<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```

<!-- Valid: -->
```sh
echo a
echo a > file
```

<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
````

Warn when shell code is prefixed by dollar-characters.
Expand Down
Loading