New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-maximum-line-length

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-maximum-line-length

remark-lint rule to warn when lines are too long

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67K
decreased by-0.31%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-maximum-line-length

Warn when lines are too long.

Options: number, default: 80.

Ignores nodes which cannot be wrapped, such as heasings, tables, code, link, images, and definitions.

Install

npm install --save remark-lint-maximum-line-length

Example

When this rule is 80, the following file invalid.md is not ok:

This line is simply not tooooooooooooooooooooooooooooooooooooooooooooooooooooooo
long.

Just like thiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis one.

And this one is also very wrong: because the link starts aaaaaaafter the column: <http://line.com>

<http://this-long-url-with-a-long-domain-is-invalid.co.uk/a-long-path?query=variables> and such.
4:86: Line must be at most 80 characters
6:99: Line must be at most 80 characters
8:97: Line must be at most 80 characters

When this rule is turned on, the following file valid.md is ok:

This line is simply not toooooooooooooooooooooooooooooooooooooooooooo
long.

This is also fine: <http://this-long-url-with-a-long-domain.co.uk/a-long-path?query=variables>

<http://this-link-is-fine.com>

[foo](http://this-long-url-with-a-long-domain-is-valid.co.uk/a-long-path?query=variables)

<http://this-long-url-with-a-long-domain-is-valid.co.uk/a-long-path?query=variables>

![foo](http://this-long-url-with-a-long-domain-is-valid.co.uk/a-long-path?query=variables)

| An | exception | is | line | length | in | long | tables | because | those | can’t | just |
| -- | --------- | -- | ---- | ------ | -- | ---- | ------ | ------- | ----- | ----- | ---- |
| be | helped    |    |      |        |    |      |        |         |       |       | .    |

The following is also fine, because there is no white-space.

<http://this-long-url-with-a-long-domain-is-invalid.co.uk/a-long-path?query=variables>.

In addition, definitions are also fine:

[foo]: <http://this-long-url-with-a-long-domain-is-invalid.co.uk/a-long-path?query=variables>

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 23 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc