feat: Make markdownlint ignore generated contributors table #194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 amarkdownlint-disable
tag.Additionally, I've scoped the
prettier-ignore
andmarkdownlint
tags to only have an effect on the generated table, by changing them toprettier-ignore-start/end
andmarkdownlint-disable/enable
respectively. This might be an unnecessary addition to prettier, as the table is just one node, and this a singleprettier-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:
Workaround:
Currently this can be achieved manually by anyone, by pre- and post-fixing the
ALL-CONTRIBUTORS-LIST
tags with the markdownlint tags: