Skip to content

Commit

Permalink
Revise docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Mar 23, 2022
1 parent 63bc4f2 commit 4194ac5
Show file tree
Hide file tree
Showing 31 changed files with 346 additions and 956 deletions.
4 changes: 3 additions & 1 deletion .remarkrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import remarkGithub from 'remark-github'
import remarkValidateLinks from 'remark-validate-links'
import listOfPresets from './script/plugin/list-of-presets.js'
import listOfRules from './script/plugin/list-of-rules.js'
import listOfSettings from './script/plugin/list-of-settings.js'

const plugins = [
remarkPresetLintRecommended,
Expand All @@ -17,7 +18,8 @@ const plugins = [
remarkGithub,
remarkValidateLinks,
listOfPresets,
listOfRules
listOfRules,
listOfSettings
]

const preset = {plugins}
Expand Down
2 changes: 1 addition & 1 deletion packages/remark-lint-code-block-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* ## API
*
* The following options (default: [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) or `'consistent'`) are accepted:
* The following options (default: [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) or `'consistent'`) are accepted:
*
* * `'fenced'`
* — prefer fenced code blocks:
Expand Down
98 changes: 6 additions & 92 deletions packages/remark-lint-code-block-style/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This rule is included in the following presets:
| Preset | Setting |
| - | - |
| [`remark-preset-lint-consistent`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-consistent) | `'consistent'` |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | `'fenced'` |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) is `true` |

## Install

Expand Down Expand Up @@ -124,7 +124,7 @@ The default export is `remarkLintCodeBlockStyle`.
This rule supports standard configuration that all remark lint rules accept
(such as `false` to turn it off or `[1, options]` to configure it).

The following options (default: [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) or `'consistent'`) are accepted:
The following options (default: [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) or `'consistent'`) are accepted:

* `'fenced'`
— prefer fenced code blocks:
Expand Down Expand Up @@ -164,7 +164,7 @@ to always use fenced code.

##### `ok.md`

When [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) is `false` and the rule is not configured.
When [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) is `false` and the rule is not configured.

###### In

Expand All @@ -182,7 +182,7 @@ No messages.

##### `not-ok.md`

When [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) is `false` and the rule is not configured.
When [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) is `false` and the rule is not configured.

###### In

Expand All @@ -207,93 +207,7 @@ bravo()

##### `ok.md`

When configured with `'indented'`.

###### In

```markdown
alpha()

Paragraph.

bravo()
```

###### Out

No messages.

##### `not-ok.md`

When configured with `'indented'`.

###### In

````markdown
```
alpha()
```

Paragraph.

```
bravo()
```
````

###### Out

```text
1:1-3:4: Code blocks should be indented
7:1-9:4: Code blocks should be indented
```

##### `ok.md`

When [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) is `true` and the rule is not configured.

###### In

````markdown
```
alpha()
```

Paragraph.

```
bravo()
```
````

###### Out

No messages.

##### `not-ok-fenced.md`

When [`settings.fences`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfences) is `true` and the rule is not configured.

###### In

```markdown
alpha()

Paragraph.

bravo()
```

###### Out

```text
1:1-1:12: Code blocks should be fenced
5:1-5:12: Code blocks should be fenced
```

##### `ok.md`

When configured with `'fenced'`.
When [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) is `true` and the rule is not configured.

###### In

Expand All @@ -315,7 +229,7 @@ No messages.

##### `not-ok-fenced.md`

When configured with `'fenced'`.
When [`settings.fences`](https://github.com/remarkjs/remark-lint#configure) is `true` and the rule is not configured.

###### In

Expand Down
2 changes: 1 addition & 1 deletion packages/remark-lint-emphasis-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* ## API
*
* The following options (default: [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) or `'consistent'`) are accepted:
* The following options (default: [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) or `'consistent'`) are accepted:
*
* * `'*'`
* — prefer asterisks
Expand Down
84 changes: 7 additions & 77 deletions packages/remark-lint-emphasis-marker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This rule is included in the following presets:
| Preset | Setting |
| - | - |
| [`remark-preset-lint-consistent`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-consistent) | `'consistent'` |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | `'*'` |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'*'` |

## Install

Expand Down Expand Up @@ -124,7 +124,7 @@ The default export is `remarkLintEmphasisMarker`.
This rule supports standard configuration that all remark lint rules accept
(such as `false` to turn it off or `[1, options]` to configure it).

The following options (default: [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) or `'consistent'`) are accepted:
The following options (default: [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) or `'consistent'`) are accepted:

* `'*'`
— prefer asterisks
Expand Down Expand Up @@ -156,7 +156,7 @@ to always use underscores.

##### `ok.md`

When [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) is `'*'` and the rule is not configured.
When [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'*'` and the rule is not configured.

###### In

Expand All @@ -170,7 +170,7 @@ No messages.

##### `not-ok.md`

When [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) is `'*'` and the rule is not configured.
When [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'*'` and the rule is not configured.

###### In

Expand All @@ -186,37 +186,7 @@ _foo_

##### `ok.md`

When configured with `'*'`.

###### In

```markdown
*foo*
```

###### Out

No messages.

##### `not-ok.md`

When configured with `'*'`.

###### In

```markdown
_foo_
```

###### Out

```text
1:1-1:6: Emphasis should use `*` as a marker
```

##### `ok.md`

When [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) is `'_'` and the rule is not configured.
When [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'_'` and the rule is not configured.

###### In

Expand All @@ -230,37 +200,7 @@ No messages.

##### `not-ok.md`

When [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) is `'_'` and the rule is not configured.

###### In

```markdown
*foo*
```

###### Out

```text
1:1-1:6: Emphasis should use `_` as a marker
```

##### `ok.md`

When configured with `'_'`.

###### In

```markdown
_foo_
```

###### Out

No messages.

##### `not-ok.md`

When configured with `'_'`.
When [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'_'` and the rule is not configured.

###### In

Expand Down Expand Up @@ -291,17 +231,7 @@ _bar_

##### `not-ok.md`

When [`settings.emphasis`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsemphasis) is `'💩'` and the rule is not configured.

###### Out

```text
1:1: Incorrect emphasis marker `💩`: use either `'consistent'`, `'*'`, or `'_'`
```

##### `not-ok.md`

When configured with `'💩'`.
When [`settings.emphasis`](https://github.com/remarkjs/remark-lint#configure) is `'💩'` and the rule is not configured.

###### Out

Expand Down
2 changes: 1 addition & 1 deletion packages/remark-lint-fenced-code-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* ## API
*
* The following options (default: [`settings.fence`](https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#optionsfence) or `'consistent'`) are accepted:
* The following options (default: [`settings.fence`](https://github.com/remarkjs/remark-lint#configure) or `'consistent'`) are accepted:
*
* * ``'`'``
* — prefer grave accents
Expand Down
Loading

0 comments on commit 4194ac5

Please sign in to comment.