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

feat: Make markdownlint ignore generated contributors table #194

Merged
merged 3 commits into from
Jul 16, 2019

Conversation

JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Jul 14, 2019

What:
Make markdownlint ignore generated table of contributors.

Why:
Currently, when generating a table of contributors, markdownlint will fail, because the line-length is more that the default, and markdownlint defaults to not allow inline html.
We can disable markdownlint for the generated table, to make all-contributors-cli work out of the box with markdownlint, just like it currently does with prettier.

How:
Just like the generator inserts a prettier-ignore tag, it now also inserts a markdownlint-disable tag.
Additionally, I've scoped the prettier-ignore and markdownlint tags to only have an effect on the generated table, by changing them to prettier-ignore-start/end and markdownlint-disable/enable respectively. This might be an unnecessary addition to prettier, as the table is just one node, and this a single prettier-ignore tag works. But I wanted it to be consistent with the disabling of markdownlint, and this ensures that prettier continues to work in the future, should we add more nodes to the table. If you disagree, I'll happily remove it again.

The changes have been tested by generating a new table in this repo, using the changed CLI (npm run start).

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Workaround:

Currently this can be achieved manually by anyone, by pre- and post-fixing the ALL-CONTRIBUTORS-LIST tags with the markdownlint tags:

<!-- markdownlint-disable -->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
... table
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- markdownlint-enable -->

.all-contributorsrc Outdated Show resolved Hide resolved
Copy link
Member

@Berkmann18 Berkmann18 left a comment

Choose a reason for hiding this comment

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

Thank you :).

@Berkmann18 Berkmann18 merged commit 42bc241 into all-contributors:master Jul 16, 2019
@all-contributors-release-bot
Copy link
Member

🎉 This PR is included in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants