remark-lint
remark-lint copied to clipboard
Add settings for enforced styles to presets
Initial checklist
- [x] I read the support docs
- [x] I read the contributing guide
- [x] I agree to follow the code of conduct
- [x] I searched issues and couldn’t find anything (or linked relevant results below)
- [x] If applicable, I’ve added docs and tests
Description of changes
What I did was, for each preset rule with remark-stringify options in that rule's "fix" documentation, I added that option to the preset's settings.
What this does is, you can apply the preset's remark-stringify options with, e.g.
remark --output --use remark-preset-lint-markdown-style-guide input.md
For example:
- remark-preset-lint-markdown-style-guide uses
[remarkLintUnorderedListMarkerStyle, '-'] - remark-lint-unordered-list-marker-style's "fix" documentation points to
settings.bullet - ∴ I added
bullet: '-'-> remark-preset-lint-markdown-style-guide's settings
Hi! It seems some of the things asked in the template are missing? Please edit your post to fill out everything.
- [ ] Initial checklist (todo)
- [x] Description of changes
You won’t get any more notifications from me, but I’ll keep on updating this comment, and remove it when done!
If you need it, here’s the original template
<!--
Please check the needed checkboxes ([ ] -> [x]). Leave the
comments as they are, they won’t show on GitHub.
We are excited about pull requests, but please try to limit the scope, provide
a general description of the changes, and remember, it’s up to you to convince
us to land it.
-->
### Initial checklist
* [ ] I read the support docs <!-- https://github.com/remarkjs/.github/blob/main/support.md -->
* [ ] I read the contributing guide <!-- https://github.com/remarkjs/.github/blob/main/contributing.md -->
* [ ] I agree to follow the code of conduct <!-- https://github.com/remarkjs/.github/blob/main/code-of-conduct.md -->
* [ ] I searched issues and couldn’t find anything (or linked relevant results below) <!-- https://github.com/search?q=user%3Aremarkjs&type=Issues -->
* [ ] If applicable, I’ve added docs and tests
### Description of changes
TODO
<!--do not edit: pr-->
Thanks, — bb
Codecov Report
Merging #282 (324ec51) into main (f0d6517) will not change coverage. The diff coverage is
100.00%.
:exclamation: Current head 324ec51 differs from pull request most recent head 6a78b63. Consider uploading reports for the commit 6a78b63 to get more accurate results
@@ Coverage Diff @@
## main #282 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 73
Lines 8449 8449
=========================================
Hits 8449 8449
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/unified-lint-rule/lib/index.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update f0d6517...6a78b63. Read the comment docs.
Do you have ideas on how to test and document these additions? What are your thoughts on the order in which your PRs should land? And, how about the breaking changes? I guess that if we’re doing this one, we can break other things too?
- [x] I've added Settings sections to each of the presets' readmes.
Thanks for merging https://github.com/remarkjs/remark-lint/pull/284#issuecomment-1083381204! Ideally I'd like to land https://github.com/remarkjs/remark-lint/pull/286 and this one (https://github.com/remarkjs/remark-lint/pull/282#issuecomment-1061811554), then rebase https://github.com/remarkjs/remark-lint/pull/279#pullrequestreview-901858269?