Utilities for working with unist/mdast ASTs, remark/remark-lint, and the unified ecosystem
[![Black Lives Matter!][x-badge-blm-image]][x-badge-blm-link]
[![Last commit timestamp][x-badge-lastcommit-image]][x-badge-repo-link]
[![Source license][x-badge-license-image]][x-badge-license-link]
[![Uses Semantic Release!][x-badge-semanticrelease-image]][x-badge-semanticrelease-link]
# unified-utils
This monorepo contains several utilities for working with [unist][1]/[mdast][2]
ASTs, [remark][3] and [remark-lint][4], and the broader [unified ecosystem][5].
---
- [Packages](#packages)
- [mdast](#mdast)
- [remark](#remark)
- [remark-lint](#remark-lint)
- [Forks](#forks)
- [Related](#related)
- [Contributing and Support](#contributing-and-support)
- [Contributors](#contributors)
## Packages
### [mdast](https://github.com/syntax-tree/mdast)
- [mdast-util-hidden][6] — prevent nodes from being seen by [transformers][7].
- [mdast-util-tight-comments][8] — selectively remove newlines around comment
nodes during serialization.
### [remark](https://github.com/remarkjs)
- [remark-capitalize-headings][9] — selectively transform headings using
Vercel's [title][10] package.
- [remark-ignore][11] — use comments to exclude one or more nodes from
[transformation][7].
- [remark-remove-unused-definitions][12] — remove unused [reference-style link
definitions][13] from a document.
- [remark-remove-url-trailing-slash][14] — remove trailing slashes from the ends
of all URL paths.
- [remark-renumber-references][15] — renumber numeric [reference-style link
ids][13] contiguously starting from `[1]`.
- [remark-sort-definitions][16] — reorder [reference-style link definitions][13]
at the end of a document.
- [remark-tight-comments][17] — selectively remove newlines around comments.
### [remark-lint](https://github.com/remarkjs/remark-lint)
- [remark-lint-fenced-code-flag-case][18] — warn when fenced code blocks have
inconsistent or improperly cased language flags.
- [remark-lint-heading-word-length][19] — warn when headings have too many or
too few words.
- [remark-lint-list-item-style][20] — warn when list items violate a given
capitalization or punctuation style.
### Forks
These are (likely temporary) installable forks with changes that might be merged
back upstream.
- ~~[remark-lint-no-empty-url][21] — warn for empty URLs in links and images
([upstream][22]).~~ Was successfully merged upstream and released! 🎉
## Related
- [@projectorjs/config-remark][23] — reusable remark presets.
- [remark][3] — processor and CLI.
- [unified][5] — parser ecosystem.
- [mdast][2] — Markdown specification.
- [unist][1] — base specification.
## Contributing and Support
**[New issues][x-repo-choose-new-issue] and [pull requests][x-repo-pr-compare]
are always welcome and greatly appreciated! 🤩** Just as well, you can [star 🌟
this project][x-badge-repo-link] to let me know you found it useful! ✊🏿 Or [buy
me a beer][x-repo-sponsor], I'd appreciate it. Thank you!
See [CONTRIBUTING.md][x-repo-contributing] and [SUPPORT.md][x-repo-support] for
more information.
### Contributors
[](#contributors-)
Thanks goes to these wonderful people ([emoji
key][x-repo-all-contributors-emojis]):
This project follows the [all-contributors][x-repo-all-contributors]
specification. Contributions of any kind welcome!
[x-badge-blm-image]: https://xunn.at/badge-blm 'Join the movement!'
[x-badge-blm-link]: https://xunn.at/donate-blm
[x-badge-lastcommit-image]:
https://img.shields.io/github/last-commit/Xunnamius/unified-utils?style=flat-square
'Latest commit timestamp'
[x-badge-license-image]:
https://img.shields.io/github/license/Xunnamius/unified-utils?style=flat-square
"This package's source license"
[x-badge-license-link]:
https://github.com/Xunnamius/unified-utils/blob/main/LICENSE
[x-badge-repo-link]: https://github.com/Xunnamius/unified-utils
[x-badge-semanticrelease-image]:
https://xunn.at/badge-semantic-release
'This repo practices continuous integration and deployment!'
[x-badge-semanticrelease-link]:
https://github.com/semantic-release/semantic-release
[x-repo-all-contributors]: https://github.com/all-contributors/all-contributors
[x-repo-all-contributors-emojis]: https://allcontributors.org/docs/en/emoji-key
[x-repo-choose-new-issue]:
https://github.com/Xunnamius/unified-utils/issues/new/choose
[x-repo-contributing]: /CONTRIBUTING.md
[x-repo-pr-compare]: https://github.com/Xunnamius/unified-utils/compare
[x-repo-sponsor]: https://github.com/sponsors/Xunnamius
[x-repo-support]: /.github/SUPPORT.md
[1]: https://github.com/syntax-tree/unist
[2]: https://github.com/syntax-tree/mdast
[3]: https://github.com/remarkjs
[4]: https://github.com/remarkjs/remark-lint
[5]: https://github.com/unifiedjs
[6]: ./packages/mdast-util-hidden
[7]: https://github.com/unifiedjs/unified#overview
[8]: ./packages/mdast-util-tight-comments
[9]: ./packages/remark-capitalize-headings
[10]: https://github.com/vercel/title
[11]: ./packages/remark-ignore
[12]: /packages/remark-remove-unused-definitions
[13]: https://github.com/remarkjs/remark-reference-links#what-is-this
[14]: ./packages/remark-remove-url-trailing-slash
[15]: ./packages/remark-renumber-references
[16]: ./packages/remark-sort-definitions
[17]: ./packages/remark-tight-comments
[18]: ./packages/remark-lint-fenced-code-flag-case
[19]: /packages/remark-lint-heading-word-length
[20]: ./packages/remark-lint-list-item-style
[21]:
https://github.com/Xunnamius/remark-lint/tree/main/packages/remark-lint-no-empty-url
[22]:
https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-empty-url
[23]: https://github.com/Xunnamius/symbiote/blob/main/packages/config-remark