Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clydedz/markdown-list-linter-cli
CLI tool to lint markdown lists to warn when list items are not alphabetically ordered
https://github.com/clydedz/markdown-list-linter-cli
action actions github github-action markdown markdown-lint markdown-list markdown-list-linter markdown-sort
Last synced: 9 days ago
JSON representation
CLI tool to lint markdown lists to warn when list items are not alphabetically ordered
- Host: GitHub
- URL: https://github.com/clydedz/markdown-list-linter-cli
- Owner: ClydeDz
- License: mit
- Created: 2023-07-06T06:30:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-10T13:04:41.000Z (over 1 year ago)
- Last Synced: 2024-11-07T23:12:08.259Z (9 days ago)
- Topics: action, actions, github, github-action, markdown, markdown-lint, markdown-list, markdown-list-linter, markdown-sort
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/markdown-list-linter-cli
- Size: 224 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdown List Linter
Command line interface (CLI) tool to lint markdown lists and warn when list items are not alphabetically ordered.
## A complete solution
This functionality is available to be consumed in three different ways:
- ⚡ [A GitHub Action](https://github.com/marketplace/actions/markdown-list-linter) as part of your CI/CD process
- 📦 [An NPM package](https://www.npmjs.com/package/markdown-list-linter) that can be consumed in your JavaScript or TypeScript code
- 💻 [A CLI](https://www.npmjs.com/package/markdown-list-linter-cli) that you can run in your terminal
## Installation
You can install this CLI tool globally.
```shell
npm install markdown-list-linter-cli -g
```## Usage
Very simple to use all results will be printed in the terminal.
```ps
> markdown-list-linter -f ./data/valid_file.md
```When there are no errors the returned object should look something like this.
```
SUMMARY:
No errors found
```If you supply a markdown file which has a list that needs to be sorted.
```ps
> markdown-list-linter -f ./data/invalid_file.md
```When there are errors the returned object should look something like this.
```
SUMMARY:
Markdown list needs to be sortedDETAILS:
Please correct the alphabetical order for these heading items
Section #1
D
A
B
CPlease correct the alphabetical order for these list items
Section #1
African Buffalo
AardwolfSection #2
Chameleon
Camel
Cheetah
Canary
```The items in each section are the items in the list which need to be reordered.
For help command, type the following.
```ps
> markdown-list-linter -h
```