Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Latest commit

 

History

History
83 lines (60 loc) · 1.89 KB

File metadata and controls

83 lines (60 loc) · 1.89 KB

remark-lint-list-item-punctuation

Build Status Coverage Status

This rule ensures that all list items are ended with certain symbol. The default symbol is ..

<!-- Invalid -->

# Section
- A
- B

<!-- Valid -->

# Section
- A.
- B.

Using the rule

Via .remarkrc

npm install -g remark
npm install -g remark-lint
npm install remark-lint-list-item-punctuation # local install!

Note: this package was renamed from remark-lint-ending-period.

Then, set up your .remarkrc:

{
  "plugins": {
    "remark-lint": {
      "external": ["remark-lint-list-item-punctuation"]
    }
  }
}

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

remark --no-stdout xxx.md

Using another ending symbol

Set up your .remarkrc:

{
  "plugins": {
    "remark-lint": {
      "external": ["remark-lint-list-item-punctuation"],
      "list-item-punctuation": {
        "endings": ["...", ";", "."]
        }
    }
  }
}

Via CLI

npm install -g remark
npm install -g remark-lint
npm install -g remark-lint-list-item-punctuation # global install!
remark --no-stdout -u remark-lint="external:[\"remark-lint-list-item-punctuation\"]" xxx.md

Note that the lint=<lint_options> option only works with remark >= 1.1.1.

License

MIT, see LICENSE.md for details.

This README.md is based on this one by @chcokr (MIT).