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

remark-lint-list-item-spacing

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-list-item-spacing - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

32

index.js

@@ -23,3 +23,3 @@ /**

*
* @example {"name": "valid.md"}
* @example {"name": "ok.md"}
*

@@ -41,3 +41,3 @@ * A tight list:

*
* @example {"name": "invalid.md", "label": "input"}
* @example {"name": "not-ok.md", "label": "input"}
*

@@ -59,3 +59,3 @@ * A tight list:

*
* @example {"name": "invalid.md", "label": "output"}
* @example {"name": "not-ok.md", "label": "output"}
*

@@ -67,3 +67,3 @@ * 4:9-5:1: Missing new line after list item

*
* @example {"name": "valid.md", "setting": {"checkBlanks": true}}
* @example {"name": "ok.md", "setting": {"checkBlanks": true}}
*

@@ -75,3 +75,3 @@ * A tight list:

* - item 2
* > Blockquote
* > Block quote
*

@@ -86,5 +86,5 @@ * A loose list:

*
* > Blockquote
* > Block quote
*
* @example {"name": "invalid.md", "setting": {"checkBlanks": true}, "label": "input"}
* @example {"name": "not-ok.md", "setting": {"checkBlanks": true}, "label": "input"}
*

@@ -98,3 +98,3 @@ * A tight list:

*
* > Blockquote
* > Block quote
* - item 3

@@ -108,8 +108,8 @@ *

* - item 2
* > Blockquote
* > Block quote
*
* @example {"name": "invalid.md", "setting": {"checkBlanks": true}, "label": "output"}
* @example {"name": "not-ok.md", "setting": {"checkBlanks": true}, "label": "output"}
*
* 5:15-6:1: Missing new line after list item
* 8:17-9:1: Missing new line after list item
* 8:18-9:1: Missing new line after list item
* 15:1-16:1: Extraneous new line after list item

@@ -133,5 +133,7 @@ */

function listItemSpacing(tree, file, pref) {
var blanks = pref && typeof pref === 'object' && Boolean(pref.checkBlanks)
var fn = blanks ? inferBlankLine : inferMultiline
function listItemSpacing(tree, file, option) {
var infer =
option && typeof option === 'object' && option.checkBlanks
? inferBlankLine
: inferMultiline

@@ -155,3 +157,3 @@ visit(tree, 'list', visitor)

while (++index < length) {
if (fn(children[index])) {
if (infer(children[index])) {
tight = false

@@ -158,0 +160,0 @@ break

{
"name": "remark-lint-list-item-spacing",
"version": "1.1.3",
"version": "1.1.4",
"description": "remark-lint rule to warn when list looseness is incorrect",

@@ -10,2 +10,3 @@ "license": "MIT",

"rule",
"remark-lint-rule",
"list",

@@ -18,2 +19,6 @@ "item",

"bugs": "https://github.com/remarkjs/remark-lint/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",

@@ -20,0 +25,0 @@ "contributors": [

@@ -39,3 +39,3 @@ <!--This file is generated-->

##### `valid.md`
##### `ok.md`

@@ -65,3 +65,3 @@ ###### In

##### `invalid.md`
##### `not-ok.md`

@@ -96,3 +96,3 @@ ###### In

##### `valid.md`
##### `ok.md`

@@ -109,3 +109,3 @@ When configured with `{ checkBlanks: true }`.

- item 2
> Blockquote
> Block quote

@@ -120,3 +120,3 @@ A loose list:

> Blockquote
> Block quote
```

@@ -128,3 +128,3 @@

##### `invalid.md`
##### `not-ok.md`

@@ -143,3 +143,3 @@ When configured with `{ checkBlanks: true }`.

> Blockquote
> Block quote
- item 3

@@ -153,3 +153,3 @@

- item 2
> Blockquote
> Block quote
```

@@ -161,3 +161,3 @@

5:15-6:1: Missing new line after list item
8:17-9:1: Missing new line after list item
8:18-9:1: Missing new line after list item
15:1-16:1: Extraneous new line after list item

@@ -179,12 +179,12 @@ ```

```diff
...
"remarkConfig": {
"plugins": [
...
"lint",
+ "lint-list-item-spacing",
...
]
}
...
```

@@ -201,4 +201,4 @@

```diff
var remark = require('remark');
var report = require('vfile-reporter');
var remark = require('remark')
var report = require('vfile-reporter')

@@ -209,4 +209,4 @@ remark()

.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file));
});
console.error(report(err || file))
})
```

@@ -220,4 +220,4 @@

This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.

@@ -251,3 +251,3 @@

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-spectrum.svg

@@ -254,0 +254,0 @@ [chat]: https://spectrum.chat/unified/remark

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