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)
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
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