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

Update build scripts to use improved settings #286

Merged
merged 1 commit into from
Mar 31, 2022
Merged
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
4 changes: 2 additions & 2 deletions packages/remark-lint-blockquote-indentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
* @copyright 2015 Titus Wormer
* @license MIT
* @example
* {"name": "ok.md", "setting": 4}
* {"name": "ok.md", "config": 4}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that we currently use config in all the readmes:

value: 'unified().use(' + camelcased + '[, config])'

What do you think about replacing setting with that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sure!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

*
* > Hello
*
* Paragraph.
*
* > World
* @example
* {"name": "ok.md", "setting": 2}
* {"name": "ok.md", "config": 2}
*
* > Hello
*
Expand Down
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`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wrapped {config} in an object. It's the tests key, which changes the order of some examples, because the tests JS object isn't order preserving: #279 (comment)

Before some examples were in numeric order, now they're in the order defined in the docblocks. Before the key was '4', now it's '{"config":4}'.

This is also a cosmetic change --- it extracts the change in example order from #279 (review). That PR changes the tests key from {config} -> {settings, config}.


###### 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
12 changes: 6 additions & 6 deletions packages/remark-lint-checkbox-character-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@
* @copyright 2015 Titus Wormer
* @license MIT
* @example
* {"name": "ok.md", "setting": {"checked": "x"}, "gfm": true}
* {"name": "ok.md", "config": {"checked": "x"}, "gfm": true}
*
* - [x] List item
* - [x] List item
*
* @example
* {"name": "ok.md", "setting": {"checked": "X"}, "gfm": true}
* {"name": "ok.md", "config": {"checked": "X"}, "gfm": true}
*
* - [X] List item
* - [X] List item
*
* @example
* {"name": "ok.md", "setting": {"unchecked": " "}, "gfm": true}
* {"name": "ok.md", "config": {"unchecked": " "}, "gfm": true}
*
* - [ ] List item
* - [ ] List item
* - [ ]··
* - [ ]
*
* @example
* {"name": "ok.md", "setting": {"unchecked": "\t"}, "gfm": true}
* {"name": "ok.md", "config": {"unchecked": "\t"}, "gfm": true}
*
* - [»] List item
* - [»] List item
Expand All @@ -77,12 +77,12 @@
* 4:5: Unchecked checkboxes should use ` ` as a marker
*
* @example
* {"setting": {"unchecked": "💩"}, "name": "not-ok.md", "label": "output", "positionless": true, "gfm": true}
* {"config": {"unchecked": "💩"}, "name": "not-ok.md", "label": "output", "positionless": true, "gfm": true}
*
* 1:1: Incorrect unchecked checkbox marker `💩`: use either `'\t'`, or `' '`
*
* @example
* {"setting": {"checked": "💩"}, "name": "not-ok.md", "label": "output", "positionless": true, "gfm": true}
* {"config": {"checked": "💩"}, "name": "not-ok.md", "label": "output", "positionless": true, "gfm": true}
*
* 1:1: Incorrect checked checkbox marker `💩`: use either `'x'`, or `'X'`
*/
Expand Down
14 changes: 7 additions & 7 deletions packages/remark-lint-code-block-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @license MIT
*
* @example
* {"setting": "indented", "name": "ok.md"}
* {"config": "indented", "name": "ok.md"}
*
* alpha()
*
Expand All @@ -58,7 +58,7 @@
* bravo()
*
* @example
* {"setting": "indented", "name": "not-ok.md", "label": "input"}
* {"config": "indented", "name": "not-ok.md", "label": "input"}
*
* ```
* alpha()
Expand All @@ -71,13 +71,13 @@
* ```
*
* @example
* {"setting": "indented", "name": "not-ok.md", "label": "output"}
* {"config": "indented", "name": "not-ok.md", "label": "output"}
*
* 1:1-3:4: Code blocks should be indented
* 7:1-9:4: Code blocks should be indented
*
* @example
* {"setting": "fenced", "name": "ok.md"}
* {"config": "fenced", "name": "ok.md"}
*
* ```
* alpha()
Expand All @@ -90,7 +90,7 @@
* ```
*
* @example
* {"setting": "fenced", "name": "not-ok-fenced.md", "label": "input"}
* {"config": "fenced", "name": "not-ok-fenced.md", "label": "input"}
*
* alpha()
*
Expand All @@ -99,7 +99,7 @@
* bravo()
*
* @example
* {"setting": "fenced", "name": "not-ok-fenced.md", "label": "output"}
* {"config": "fenced", "name": "not-ok-fenced.md", "label": "output"}
*
* 1:1-1:12: Code blocks should be fenced
* 5:1-5:12: Code blocks should be fenced
Expand All @@ -121,7 +121,7 @@
* 5:1-7:4: Code blocks should be indented
*
* @example
* {"setting": "💩", "name": "not-ok-incorrect.md", "label": "output", "positionless": true}
* {"config": "💩", "name": "not-ok-incorrect.md", "label": "output", "positionless": true}
*
* 1:1: Incorrect code block style `💩`: use either `'consistent'`, `'fenced'`, or `'indented'`
*/
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"}
* {"config": "*", "name": "ok.md"}
*
* *foo*
*
* @example
* {"setting": "*", "name": "not-ok.md", "label": "input"}
* {"config": "*", "name": "not-ok.md", "label": "input"}
*
* _foo_
*
* @example
* {"setting": "*", "name": "not-ok.md", "label": "output"}
* {"config": "*", "name": "not-ok.md", "label": "output"}
*
* 1:1-1:6: Emphasis should use `*` as a marker
*
* @example
* {"setting": "_", "name": "ok.md"}
* {"config": "_", "name": "ok.md"}
*
* _foo_
*
* @example
* {"setting": "_", "name": "not-ok.md", "label": "input"}
* {"config": "_", "name": "not-ok.md", "label": "input"}
*
* *foo*
*
* @example
* {"setting": "_", "name": "not-ok.md", "label": "output"}
* {"config": "_", "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}
* {"config": "💩", "name": "not-ok.md", "label": "output", "positionless": true}
*
* 1:1: Incorrect emphasis marker `💩`: use either `'consistent'`, `'*'`, or `'_'`
*/
Expand Down
14 changes: 7 additions & 7 deletions packages/remark-lint-fenced-code-flag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,47 +50,47 @@
* 1:1-3:4: Missing code language flag
*
* @example
* {"name": "ok.md", "setting": {"allowEmpty": true}}
* {"name": "ok.md", "config": {"allowEmpty": true}}
*
* ```
* alpha()
* ```
*
* @example
* {"name": "not-ok.md", "setting": {"allowEmpty": false}, "label": "input"}
* {"name": "not-ok.md", "config": {"allowEmpty": false}, "label": "input"}
*
* ```
* alpha()
* ```
*
* @example
* {"name": "not-ok.md", "setting": {"allowEmpty": false}, "label": "output"}
* {"name": "not-ok.md", "config": {"allowEmpty": false}, "label": "output"}
*
* 1:1-3:4: Missing code language flag
*
* @example
* {"name": "ok.md", "setting": ["alpha"]}
* {"name": "ok.md", "config": ["alpha"]}
*
* ```alpha
* bravo()
* ```
*
* @example
* {"name": "ok.md", "setting": {"flags":["alpha"]}}
* {"name": "ok.md", "config": {"flags":["alpha"]}}
*
* ```alpha
* bravo()
* ```
*
* @example
* {"name": "not-ok.md", "setting": ["charlie"], "label": "input"}
* {"name": "not-ok.md", "config": ["charlie"], "label": "input"}
*
* ```alpha
* bravo()
* ```
*
* @example
* {"name": "not-ok.md", "setting": ["charlie"], "label": "output"}
* {"name": "not-ok.md", "config": ["charlie"], "label": "output"}
*
* 1:1-3:4: Incorrect code language flag
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-fenced-code-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* bravo()
*
* @example
* {"name": "ok.md", "setting": "`"}
* {"name": "ok.md", "config": "`"}
*
* ```alpha
* bravo()
Expand All @@ -52,7 +52,7 @@
* ```
*
* @example
* {"name": "ok.md", "setting": "~"}
* {"name": "ok.md", "config": "~"}
*
* ~~~alpha
* bravo()
Expand Down Expand Up @@ -95,7 +95,7 @@
* 5:1-7:4: Fenced code should use `~` as a marker
*
* @example
* {"name": "not-ok-incorrect.md", "setting": "💩", "label": "output", "positionless": true}
* {"name": "not-ok-incorrect.md", "config": "💩", "label": "output", "positionless": true}
*
* 1:1: Incorrect fenced code marker `💩`: use either `'consistent'`, `` '`' ``, or `'~'`
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/remark-lint-file-extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* 1:1: Incorrect extension: use `md`
*
* @example
* {"name": "readme.mkd", "setting": "mkd"}
* {"name": "readme.mkd", "config": "mkd"}
*/

/**
Expand Down
12 changes: 6 additions & 6 deletions packages/remark-lint-first-heading-level/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,40 +68,40 @@
* 1:1-1:17: First heading level should be `1`
*
* @example
* {"name": "ok.md", "setting": 2}
* {"name": "ok.md", "config": 2}
*
* ## Delta
*
* Paragraph.
*
* @example
* {"name": "ok-html.md", "setting": 2}
* {"name": "ok-html.md", "config": 2}
*
* <h2>Echo</h2>
*
* Paragraph.
*
* @example
* {"name": "not-ok.md", "setting": 2, "label": "input"}
* {"name": "not-ok.md", "config": 2, "label": "input"}
*
* # Foxtrot
*
* Paragraph.
*
* @example
* {"name": "not-ok.md", "setting": 2, "label": "output"}
* {"name": "not-ok.md", "config": 2, "label": "output"}
*
* 1:1-1:10: First heading level should be `2`
*
* @example
* {"name": "not-ok-html.md", "setting": 2, "label": "input"}
* {"name": "not-ok-html.md", "config": 2, "label": "input"}
*
* <h1>Golf</h1>
*
* Paragraph.
*
* @example
* {"name": "not-ok-html.md", "setting": 2, "label": "output"}
* {"name": "not-ok-html.md", "config": 2, "label": "output"}
*
* 1:1-1:14: First heading level should be `2`
*/
Expand Down
Loading