Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 11, 2021
1 parent e7a7701 commit e3ddd9e
Show file tree
Hide file tree
Showing 120 changed files with 479 additions and 526 deletions.
10 changes: 5 additions & 5 deletions packages/remark-lint-blockquote-indentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@

import {lintRule} from 'unified-lint-rule'
import plural from 'pluralize'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintBlockquoteIndentation = lintRule(
'remark-lint:blockquote-indentation',
Expand Down Expand Up @@ -85,7 +85,7 @@ function blockquoteIndentation(tree, file, option) {
plural('space', abs) +
' between block quote and content'

file.message(reason, position.start(node.children[0]))
file.message(reason, pointStart(node.children[0]))
}
} else {
preferred = check(node)
Expand All @@ -94,5 +94,5 @@ function blockquoteIndentation(tree, file, option) {
}

function check(node) {
return position.start(node.children[0]).column - position.start(node).column
return pointStart(node.children[0]).column - pointStart(node).column
}
6 changes: 3 additions & 3 deletions packages/remark-lint-blockquote-indentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"dependencies": {
"pluralize": "^8.0.0",
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
12 changes: 5 additions & 7 deletions packages/remark-lint-checkbox-character-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintCheckboxCharacterStyle = lintRule(
'remark-lint:checkbox-character-style',
Expand All @@ -81,9 +81,6 @@ const remarkLintCheckboxCharacterStyle = lintRule(

export default remarkLintCheckboxCharacterStyle

var start = position.start
var end = position.end

var checked = {x: true, X: true}
var unchecked = {' ': true, '\t': true}
var types = {true: 'checked', false: 'unchecked'}
Expand Down Expand Up @@ -127,7 +124,8 @@ function checkboxCharacterStyle(tree, file, option) {
// A list item cannot be checked and empty, according to GFM, but
// theoretically it makes sense to get the end if that were possible.
/* c8 ignore next */
point = node.children.length === 0 ? end(node) : start(node.children[0])
point =
node.children.length === 0 ? pointEnd(node) : pointStart(node.children[0])
// Move back to before `] `.
point.offset -= 2
point.column -= 2
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-checkbox-character-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
20 changes: 9 additions & 11 deletions packages/remark-lint-checkbox-content-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
*/

import {lintRule} from 'unified-lint-rule'
import vfileLocation from 'vfile-location'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {location} from 'vfile-location'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintCheckboxContentIndent = lintRule(
'remark-lint:checkbox-content-indent',
Expand All @@ -40,14 +40,11 @@ const remarkLintCheckboxContentIndent = lintRule(

export default remarkLintCheckboxContentIndent

var start = position.start
var end = position.end

var reason = 'Checkboxes should be followed by a single character'

function checkboxContentIndent(tree, file) {
var contents = String(file)
var location = vfileLocation(file)
var loc = location(file)

visit(tree, 'listItem', visitor)

Expand All @@ -65,7 +62,8 @@ function checkboxContentIndent(tree, file) {
// A list item cannot be checked and empty, according to GFM, but
// theoretically it makes sense to get the end if that were possible.
/* c8 ignore next */
point = node.children.length === 0 ? end(node) : start(node.children[0])
point =
node.children.length === 0 ? pointEnd(node) : pointStart(node.children[0])

// Assume we start with a checkbox, because well, `checked` is set.
value = /\[([\t xX])]/.exec(
Expand All @@ -84,8 +82,8 @@ function checkboxContentIndent(tree, file) {

if (final - initial > 0) {
file.message(reason, {
start: location.toPosition(initial),
end: location.toPosition(final)
start: loc.toPoint(initial),
end: loc.toPoint(final)
})
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/remark-lint-checkbox-content-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0",
"vfile-location": "^3.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0",
"vfile-location": "^4.0.0"
},
"xo": false
}
13 changes: 5 additions & 8 deletions packages/remark-lint-code-block-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintCodeBlockStyle = lintRule(
'remark-lint:code-block-style',
Expand All @@ -104,9 +104,6 @@ const remarkLintCodeBlockStyle = lintRule(

export default remarkLintCodeBlockStyle

var start = position.start
var end = position.end

var styles = {null: true, fenced: true, indented: true}

function codeBlockStyle(tree, file, option) {
Expand All @@ -133,8 +130,8 @@ function codeBlockStyle(tree, file, option) {
return null
}

initial = start(node).offset
final = end(node).offset
initial = pointStart(node).offset
final = pointEnd(node).offset

current =
node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final))
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-code-block-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
10 changes: 5 additions & 5 deletions packages/remark-lint-definition-case/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintDefinitionCase = lintRule(
'remark-lint:definition-case',
Expand All @@ -40,8 +40,8 @@ function definitionCase(tree, file) {
visit(tree, ['definition', 'footnoteDefinition'], check)

function check(node) {
var start = position.start(node).offset
var end = position.end(node).offset
var start = pointStart(node).offset
var end = pointEnd(node).offset
var value

if (!generated(node)) {
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-definition-case/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
10 changes: 5 additions & 5 deletions packages/remark-lint-definition-spacing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintDefinitionSpacing = lintRule(
'remark-lint:definition-spacing',
Expand All @@ -40,8 +40,8 @@ function definitionSpacing(tree, file) {
visit(tree, ['definition', 'footnoteDefinition'], check)

function check(node) {
var start = position.start(node).offset
var end = position.end(node).offset
var start = pointStart(node).offset
var end = pointEnd(node).offset

if (
!generated(node) &&
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-definition-spacing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
8 changes: 4 additions & 4 deletions packages/remark-lint-emphasis-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintEmphasisMarker = lintRule(
'remark-lint:emphasis-marker',
Expand Down Expand Up @@ -93,7 +93,7 @@ function emphasisMarker(tree, file, option) {
var marker

if (!generated(node)) {
marker = contents.charAt(position.start(node).offset)
marker = contents.charAt(pointStart(node).offset)

if (preferred) {
if (marker !== preferred) {
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-emphasis-marker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
11 changes: 4 additions & 7 deletions packages/remark-lint-fenced-code-flag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintFencedCodeFlag = lintRule(
'remark-lint:fenced-code-flag',
Expand All @@ -76,9 +76,6 @@ const remarkLintFencedCodeFlag = lintRule(

export default remarkLintFencedCodeFlag

var start = position.start
var end = position.end

var fence = /^ {0,3}([~`])\1{2,}/
var reasonIncorrect = 'Incorrect code language flag'
var reasonMissing = 'Missing code language flag'
Expand Down Expand Up @@ -109,7 +106,7 @@ function fencedCodeFlag(tree, file, option) {
file.message(reasonIncorrect, node)
}
} else {
value = contents.slice(start(node).offset, end(node).offset)
value = contents.slice(pointStart(node).offset, pointEnd(node).offset)

if (!allowEmpty && fence.test(value)) {
file.message(reasonMissing, node)
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-fenced-code-flag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
8 changes: 4 additions & 4 deletions packages/remark-lint-fenced-code-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
*/

import {lintRule} from 'unified-lint-rule'
import visit from 'unist-util-visit'
import position from 'unist-util-position'
import generated from 'unist-util-generated'
import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintFencedCodeMarker = lintRule(
'remark-lint:fenced-code-marker',
Expand Down Expand Up @@ -120,7 +120,7 @@ function fencedCodeMarker(tree, file, option) {
var label

if (!generated(node)) {
start = position.start(node).offset
start = pointStart(node).offset
marker = contents
.slice(start, start + 4)
.replace(/^\s+/, '')
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-lint-fenced-code-marker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-generated": "^2.0.0",
"unist-util-position": "^4.0.0",
"unist-util-visit": "^4.0.0"
},
"xo": false
}
Loading

0 comments on commit e3ddd9e

Please sign in to comment.