Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vhf/remark-lint-alphabetize-lists

remark-lint-alphabetize-lists
https://github.com/vhf/remark-lint-alphabetize-lists

Last synced: 17 days ago
JSON representation

remark-lint-alphabetize-lists

Awesome Lists containing this project

README

        

# remark-lint-alphabetize-lists [![Build Status](https://travis-ci.com/vhf/remark-lint-alphabetize-lists.svg?branch=master)](https://travis-ci.com/vhf/remark-lint-alphabetize-lists)

This [remark-lint](https://github.com/wooorm/remark-lint) rule was created for [free-programming-books-lint](https://github.com/vhf/free-programming-books-lint) to enforce [free-programming-books](https://github.com/vhf/free-programming-books) [formatting guidelines](https://github.com/vhf/free-programming-books/blob/master/CONTRIBUTING.md#formatting).

This rule ensures that all list items are in alphabetical order

```Text

# Section
- B
- [A](#C)

# Section
- [A](#C)
- B
```

## Using the rule

### Via `.remarkrc`

```bash
npm install -g remark-cli
npm install remark-lint remark-lint-alphabetize-lists
```

Then, set up your `.remarkrc`:

```JSON
{
"plugins": [
"lint",
"lint-alphabetize-lists"
]
}
```

Now you can use the following command to run the lint:

```bash
remark xxx.md
```

### Via CLI

```bash
npm install -g remark-cli
npm install remark-lint remark-lint-alphabetize-lists
remark -u lint -u lint-alphabetize-lists xxx.md
```