Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-maximum-line-length

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-maximum-line-length - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

21

index.d.ts
export default remarkLintMaximumLineLength
export type Root = import('mdast').Root
export type Parent = import('mdast').Parent
/**
* Options.
*/
export type Options = number
declare const remarkLintMaximumLineLength: import('unified').Plugin<
| void[]
| [number | 'warn' | 'on' | 'off' | 'error' | undefined]
| [
(
| boolean
| import('unified-lint-rule').Label
| import('unified-lint-rule').Severity
),
number | undefined
| number
| [
(
| boolean
| import('unified-lint-rule/lib/index.js').Label
| import('unified-lint-rule/lib/index.js').Severity
),
(number | undefined)?
]
| undefined
],

@@ -16,0 +21,0 @@ import('mdast').Root,

@@ -61,3 +61,3 @@ /**

* @example
* {"name": "not-ok.md", "setting": 80, "label": "input", "positionless": true}
* {"name": "not-ok.md", "config": 80, "label": "input", "positionless": true}
*

@@ -78,3 +78,3 @@ * This line is simply not tooooooooooooooooooooooooooooooooooooooooooooooooooooooo

* @example
* {"name": "not-ok.md", "setting": 80, "label": "output", "positionless": true}
* {"name": "not-ok.md", "config": 80, "label": "output", "positionless": true}
*

@@ -88,3 +88,3 @@ * 4:86: Line must be at most 80 characters

* @example
* {"name": "ok-mixed-line-endings.md", "setting": 10, "positionless": true}
* {"name": "ok-mixed-line-endings.md", "config": 10, "positionless": true}
*

@@ -97,3 +97,3 @@ * 0123456789␍␊

* @example
* {"name": "not-ok-mixed-line-endings.md", "setting": 10, "label": "input", "positionless": true}
* {"name": "not-ok-mixed-line-endings.md", "config": 10, "label": "input", "positionless": true}
*

@@ -106,3 +106,3 @@ * 012345678901␍␊

* @example
* {"name": "not-ok-mixed-line-endings.md", "setting": 10, "label": "output", "positionless": true}
* {"name": "not-ok-mixed-line-endings.md", "config": 10, "label": "output", "positionless": true}
*

@@ -117,4 +117,7 @@ * 1:13: Line must be at most 10 characters

* @typedef {import('mdast').Root} Root
* @typedef {import('mdast').Parent} Parent
*/
/**
* @typedef {number} Options
* Options.
*/

@@ -169,5 +172,3 @@

// allowed.
visit(tree, (node, pos, parent_) => {
const parent = /** @type {Parent} */ (parent_)
visit(tree, (node, pos, parent) => {
if (

@@ -174,0 +175,0 @@ (node.type === 'link' ||

{
"name": "remark-lint-maximum-line-length",
"version": "3.1.2",
"version": "3.1.3",
"description": "remark-lint rule to warn when lines are too long",

@@ -44,5 +44,3 @@ "license": "MIT",

},
"scripts": {
"build": "rimraf \"*.d.ts\" && tsc && type-coverage"
},
"scripts": {},
"xo": false,

@@ -49,0 +47,0 @@ "typeCoverage": {

@@ -57,13 +57,13 @@ <!--This file is generated-->

In Deno with [Skypack][]:
In Deno with [`esm.sh`][esmsh]:
```js
import remarkLintMaximumLineLength from 'https://cdn.skypack.dev/remark-lint-maximum-line-length@3?dts'
import remarkLintMaximumLineLength from 'https://esm.sh/remark-lint-maximum-line-length@3'
```
In browsers with [Skypack][]:
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import remarkLintMaximumLineLength from 'https://cdn.skypack.dev/remark-lint-maximum-line-length@3?min'
import remarkLintMaximumLineLength from 'https://esm.sh/remark-lint-maximum-line-length@3?bundle'
</script>

@@ -142,38 +142,37 @@ ```

##### `ok-mixed-line-endings.md`
##### `ok.md`
When configured with `10`.
###### In
> 👉 **Note**: `␍␊` represents a carriage return and a line feed.
> 👉 **Note**: this example uses GFM ([`remark-gfm`][gfm]).
> 👉 **Note**: `␊` represents a line feed.
```markdown
0123456789␍␊
0123456789␊
01234␍␊
01234␊
```
This line is simply not toooooooooooooooooooooooooooooooooooooooooooo
long.
###### Out
This is also fine: <http://this-long-url-with-a-long-domain.co.uk/a-long-path?query=variables>
No messages.
<http://this-link-is-fine.com>
##### `not-ok-mixed-line-endings.md`
`alphaBravoCharlieDeltaEchoFoxtrotGolfHotelIndiaJuliettKiloLimaMikeNovemberOscarPapaQuebec.romeo()`
When configured with `10`.
[foo](http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables)
###### In
<http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>
> 👉 **Note**: `␍␊` represents a carriage return and a line feed.
![foo](http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables)
> 👉 **Note**: `␊` represents a line feed.
| An | exception | is | line | length | in | long | tables | because | those | can’t | just |
| -- | --------- | -- | ---- | ------ | -- | ---- | ------ | ------- | ----- | ----- | ---- |
| be | helped | | | | | | | | | | . |
```markdown
012345678901␍␊
012345678901␊
01234567890␍␊
01234567890␊
<a><b><i><p><q><s><u>alpha bravo charlie delta echo foxtrot golf</u></s></q></p></i></b></a>
The following is also fine (note the `.`), because there is no whitespace.
<http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>.
In addition, definitions are also fine:
[foo]: <http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>
```

@@ -183,8 +182,3 @@

```text
1:13: Line must be at most 10 characters
2:13: Line must be at most 10 characters
3:12: Line must be at most 10 characters
4:12: Line must be at most 10 characters
```
No messages.

@@ -222,37 +216,38 @@ ##### `not-ok.md`

##### `ok.md`
##### `ok-mixed-line-endings.md`
When configured with `10`.
###### In
> 👉 **Note**: this example uses GFM ([`remark-gfm`][gfm]).
> 👉 **Note**: `␍␊` represents a carriage return and a line feed.
> 👉 **Note**: `␊` represents a line feed.
```markdown
This line is simply not toooooooooooooooooooooooooooooooooooooooooooo
long.
0123456789␍␊
0123456789␊
01234␍␊
01234␊
```
This is also fine: <http://this-long-url-with-a-long-domain.co.uk/a-long-path?query=variables>
###### Out
<http://this-link-is-fine.com>
No messages.
`alphaBravoCharlieDeltaEchoFoxtrotGolfHotelIndiaJuliettKiloLimaMikeNovemberOscarPapaQuebec.romeo()`
##### `not-ok-mixed-line-endings.md`
[foo](http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables)
When configured with `10`.
<http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>
###### In
![foo](http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables)
> 👉 **Note**: `␍␊` represents a carriage return and a line feed.
| An | exception | is | line | length | in | long | tables | because | those | can’t | just |
| -- | --------- | -- | ---- | ------ | -- | ---- | ------ | ------- | ----- | ----- | ---- |
| be | helped | | | | | | | | | | . |
> 👉 **Note**: `␊` represents a line feed.
<a><b><i><p><q><s><u>alpha bravo charlie delta echo foxtrot golf</u></s></q></p></i></b></a>
The following is also fine (note the `.`), because there is no whitespace.
<http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>.
In addition, definitions are also fine:
[foo]: <http://this-long-url-with-a-long-domain-is-ok.co.uk/a-long-path?query=variables>
```markdown
012345678901␍␊
012345678901␊
01234567890␍␊
01234567890␊
```

@@ -262,3 +257,8 @@

No messages.
```text
1:13: Line must be at most 10 characters
2:13: Line must be at most 10 characters
3:12: Line must be at most 10 characters
4:12: Line must be at most 10 characters
```

@@ -320,3 +320,3 @@ ## Compatibility

[skypack]: https://www.skypack.dev
[esmsh]: https://esm.sh

@@ -323,0 +323,0 @@ [npm]: https://docs.npmjs.com/cli/install

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