Skip to content

Commit

Permalink
Add settings to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Feb 20, 2022
1 parent 09a43cf commit ef344b4
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 131 deletions.
12 changes: 6 additions & 6 deletions packages/remark-lint-blockquote-indentation/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,16 @@ Due to this, it’s recommended to configure this rule with `2`.

##### `ok.md`

When configured with `2`.
When configured with `4`.

###### In

```markdown
> Hello
> Hello

Paragraph.

> World
> World
```

###### Out
Expand All @@ -175,16 +175,16 @@ No messages.

##### `ok.md`

When configured with `4`.
When configured with `2`.

###### In

```markdown
> Hello
> Hello

Paragraph.

> World
> World
```

###### Out
Expand Down
14 changes: 7 additions & 7 deletions packages/remark-lint-emphasis-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,32 @@
* @copyright 2015 Titus Wormer
* @license MIT
* @example
* {"setting": "*", "name": "ok.md"}
* {"settings": {"emphasis": "*"}, "name": "ok.md"}
*
* *foo*
*
* @example
* {"setting": "*", "name": "not-ok.md", "label": "input"}
* {"settings": {"emphasis": "*"}, "name": "not-ok.md", "label": "input"}
*
* _foo_
*
* @example
* {"setting": "*", "name": "not-ok.md", "label": "output"}
* {"settings": {"emphasis": "*"}, "name": "not-ok.md", "label": "output"}
*
* 1:1-1:6: Emphasis should use `*` as a marker
*
* @example
* {"setting": "_", "name": "ok.md"}
* {"settings": {"emphasis": "_"}, "name": "ok.md"}
*
* _foo_
*
* @example
* {"setting": "_", "name": "not-ok.md", "label": "input"}
* {"settings": {"emphasis": "_"}, "name": "not-ok.md", "label": "input"}
*
* *foo*
*
* @example
* {"setting": "_", "name": "not-ok.md", "label": "output"}
* {"settings": {"emphasis": "_"}, "name": "not-ok.md", "label": "output"}
*
* 1:1-1:6: Emphasis should use `_` as a marker
*
Expand All @@ -81,7 +81,7 @@
* 2:1-2:6: Emphasis should use `*` as a marker
*
* @example
* {"setting": "💩", "name": "not-ok.md", "label": "output", "positionless": true}
* {"settings": {"emphasis": "💩"}, "name": "not-ok.md", "label": "output", "positionless": true}
*
* 1:1: Incorrect emphasis marker `💩`: use either `'consistent'`, `'*'`, or `'_'`
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/remark-lint-emphasis-marker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ to always use underscores.

##### `ok.md`

When configured with `'*'`.
When configured with `{ emphasis: '*' }`.

###### In

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

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

When configured with `'*'`.
When configured with `{ emphasis: '*' }`.

###### In

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

##### `ok.md`

When configured with `'_'`.
When configured with `{ emphasis: '_' }`.

###### In

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

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

When configured with `'_'`.
When configured with `{ emphasis: '_' }`.

###### In

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

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

When configured with `'💩'`.
When configured with `{ emphasis: '💩' }`.

###### Out

Expand Down
72 changes: 36 additions & 36 deletions packages/remark-lint-first-heading-level/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,10 @@ a value of `2` can be defined here.

##### `ok.md`

When configured with `2`.

###### In

```markdown
## Delta

Paragraph.
# The default is to expect a level one heading
```

###### Out
Expand All @@ -151,14 +147,26 @@ No messages.

##### `ok-html.md`

When configured with `2`.
###### In

```markdown
<h1>An HTML heading is also seen by this rule.</h1>
```

###### Out

No messages.

##### `ok-delayed.md`

###### In

```markdown
<h2>Echo</h2>
You can use markdown content before the heading.

Paragraph.
<div>Or non-heading HTML</div>

<h1>So the first heading, be it HTML or markdown, is checked</h1>
```

###### Out
Expand All @@ -167,46 +175,46 @@ No messages.

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

When configured with `2`.

###### In

```markdown
# Foxtrot
## Bravo

Paragraph.
```

###### Out

```text
1:1-1:10: First heading level should be `2`
1:1-1:9: First heading level should be `1`
```

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

When configured with `2`.

###### In

```markdown
<h1>Golf</h1>
<h2>Charlie</h2>

Paragraph.
```

###### Out

```text
1:1-1:14: First heading level should be `2`
1:1-1:17: First heading level should be `1`
```

##### `ok.md`

When configured with `2`.

###### In

```markdown
# The default is to expect a level one heading
## Delta

Paragraph.
```

###### Out
Expand All @@ -215,26 +223,14 @@ No messages.

##### `ok-html.md`

###### In

```markdown
<h1>An HTML heading is also seen by this rule.</h1>
```

###### Out

No messages.

##### `ok-delayed.md`
When configured with `2`.

###### In

```markdown
You can use markdown content before the heading.

<div>Or non-heading HTML</div>
<h2>Echo</h2>

<h1>So the first heading, be it HTML or markdown, is checked</h1>
Paragraph.
```

###### Out
Expand All @@ -243,34 +239,38 @@ No messages.

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

When configured with `2`.

###### In

```markdown
## Bravo
# Foxtrot

Paragraph.
```

###### Out

```text
1:1-1:9: First heading level should be `1`
1:1-1:10: First heading level should be `2`
```

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

When configured with `2`.

###### In

```markdown
<h2>Charlie</h2>
<h1>Golf</h1>

Paragraph.
```

###### Out

```text
1:1-1:17: First heading level should be `1`
1:1-1:14: First heading level should be `2`
```

## Compatibility
Expand Down
20 changes: 10 additions & 10 deletions packages/remark-lint-maximum-heading-length/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,35 +139,35 @@ which reads every heading out loud).

## Examples

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

When configured with `40`.
##### `ok.md`

###### In

```markdown
# Alpha bravo charlie delta echo foxtrot golf hotel

# ![Alpha bravo charlie delta echo foxtrot golf hotel](http://example.com/nato.png)
```

###### Out

```text
1:1-1:52: Use headings shorter than `40`
```
No messages.

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

When configured with `40`.

###### In

```markdown
# Alpha bravo charlie delta echo foxtrot golf hotel

# ![Alpha bravo charlie delta echo foxtrot golf hotel](http://example.com/nato.png)
```

###### Out

No messages.
```text
1:1-1:52: Use headings shorter than `40`
```

## Compatibility

Expand Down
Loading

0 comments on commit ef344b4

Please sign in to comment.