Skip to content

vhf/remark-lint-no-url-trailing-slash

Repository files navigation

remark-lint-no-url-trailing-slash

This remark-lint rule was created for free-programming-books-lint to enforce free-programming-books formatting guidelines.

This rule checks that the host part of a URL has no extra trailing slash. It only applies to links.

<!-- Invalid -->

[example.com](http://example.com/)

<!-- Valid -->

[example.com](http://example.com)

Using the rule

Via .remarkrc

npm install -g remark-cli
npm install remark-lint remark-lint-no-url-trailing-slash

Then, set up your .remarkrc:

{
  "plugins": [
    "lint",
    "lint-no-url-trailing-slash"
  ]
}

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

remark xxx.md

Via CLI

npm install -g remark-cli
npm install remark-lint remark-lint-no-url-trailing-slash
remark -u lint -u lint-no-url-trailing-slash xxx.md

About

remark-lint-no-url-trailing-slash

Resources

Stars

Watchers

Forks

Packages

No packages published