Skip to content

Use hyphens for bulleted lists#2138

Merged
kytrinyx merged 4 commits intomainfrom
hyphens-for-lists
Oct 28, 2022
Merged

Use hyphens for bulleted lists#2138
kytrinyx merged 4 commits intomainfrom
hyphens-for-lists

Conversation

@kytrinyx
Copy link
Copy Markdown
Member

We've had some churn due to not having documented our
preference.

This is now documented in
exercism/docs#399

We've had some churn due to not having documented our
preference.

This is now documented in
exercism/docs#399
@kytrinyx kytrinyx requested review from Stargator, ee7, kotp and wolf99 October 27, 2022 15:30
Copy link
Copy Markdown
Member

@ee7 ee7 left a comment

Choose a reason for hiding this comment

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

Could you add the MD004 rule to this repo's markdownlint rules? Then CI should enforce that the PR is correct, and that future PRs do not add unordered list items with the less preferred style.

// For information on writing markdownlint configuration see:
// https://github.com/DavidAnson/markdownlint/blob/main/README.md#optionsconfig
{
"MD013": false, // Exercism tends to break lines at sentence ends rather than at a column limit
"MD024": false // The format for instructions.md requires repeated headings, e.g. "Task"
}

I believe:

     "MD004": "dash",

It's run from here:

markdown-lint:
name: Lint markdown files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132
with:
globs: |
**/*.md

This ensures that CI enforces the choice of bullet for the markdown
files in this repository.
@kytrinyx
Copy link
Copy Markdown
Member Author

kytrinyx commented Oct 27, 2022

@ee7 I updated the linter, and CI is passing. I'm going to deliberately cause it to fail, to check that it's configured correctly.

The previous commit deliberately introduced an error
to check that CI caught it correctly, which it did.

This reverts commit cf249d5.
@kytrinyx
Copy link
Copy Markdown
Member Author

Ok, that looks good. Thanks for your help @ee7

Copy link
Copy Markdown
Member

@ee7 ee7 left a comment

Choose a reason for hiding this comment

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

CI does look good - thanks for checking that it works.

I also checked independently that, with this PR, there really are no remaining unordered list items that use * or + (both are valid markers, but we only used * previously):

$ git rev-parse --short HEAD
b61cb4ac
$ rg -U '\n\s*[\*\+]{1}\s+' --type markdown
$ echo $?
1

Copy link
Copy Markdown
Contributor

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

What's not to love about a linting PR? 💛

@kytrinyx kytrinyx merged commit df691ee into main Oct 28, 2022
@kytrinyx kytrinyx deleted the hyphens-for-lists branch October 28, 2022 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants