Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
*   Update [`remark-message-control`](https://github.com/remarkjs/remark-message-control/releases/tag/6.0.0)
*   Update [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit/releases/tag/2.0.0)
*   Update [`vfile-location`](https://github.com/vfile/vfile-location/releases/tag/3.0.0)
*   Replace `plur` with `pluralize` for better browser support
  • Loading branch information
wooorm committed Mar 30, 2020
1 parent 590669a commit 6e92eed
Show file tree
Hide file tree
Showing 66 changed files with 95 additions and 86 deletions.
8 changes: 5 additions & 3 deletions packages/remark-lint-blockquote-indentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'use strict'

var rule = require('unified-lint-rule')
var plural = require('plur')
var plural = require('pluralize')
var visit = require('unist-util-visit')
var position = require('unist-util-position')
var generated = require('unist-util-generated')
Expand All @@ -65,6 +65,7 @@ function blockquoteIndentation(tree, file, option) {
visit(tree, 'blockquote', visitor)

function visitor(node) {
var abs
var diff
var reason

Expand All @@ -76,12 +77,13 @@ function blockquoteIndentation(tree, file, option) {
diff = preferred - check(node)

if (diff !== 0) {
abs = Math.abs(diff)
reason =
(diff > 0 ? 'Add' : 'Remove') +
' ' +
Math.abs(diff) +
abs +
' ' +
plural('space', diff) +
plural('space', abs) +
' between block quote and content'

file.message(reason, position.start(node.children[0]))
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-lint-blockquote-indentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
],
"dependencies": {
"mdast-util-to-string": "^1.0.2",
"plur": "^3.0.0",
"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": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
4 changes: 2 additions & 2 deletions packages/remark-lint-checkbox-character-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1",
"vfile-location": "^2.0.1"
"unist-util-visit": "^2.0.0",
"vfile-location": "^3.0.0"
},
"xo": false
}
4 changes: 2 additions & 2 deletions packages/remark-lint-checkbox-content-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1",
"vfile-location": "^2.0.1"
"unist-util-visit": "^2.0.0",
"vfile-location": "^3.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-code-block-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-definition-case/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.4.0"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-definition-spacing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.4.0"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-emphasis-marker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-fenced-code-flag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-fenced-code-marker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-final-definition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-first-heading-level/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-visit": "^1.4.0"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-hard-break-spaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-heading-increment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-heading-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"mdast-util-heading-style": "^1.0.2",
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-linebreak-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
"dependencies": {
"unified-lint-rule": "^1.0.0",
"vfile-location": "^2.0.1"
"vfile-location": "^3.0.0"
},
"xo": false
}
4 changes: 2 additions & 2 deletions packages/remark-lint-link-title-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1",
"vfile-location": "^2.0.1"
"unist-util-visit": "^2.0.0",
"vfile-location": "^3.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-list-item-bullet-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'use strict'

var rule = require('unified-lint-rule')
var plural = require('plur')
var plural = require('pluralize')
var visit = require('unist-util-visit')
var position = require('unist-util-position')
var generated = require('unist-util-generated')
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-lint-list-item-bullet-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"index.js"
],
"dependencies": {
"plur": "^3.0.0",
"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": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
8 changes: 5 additions & 3 deletions packages/remark-lint-list-item-content-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'use strict'

var rule = require('unified-lint-rule')
var plural = require('plur')
var plural = require('pluralize')
var visit = require('unist-util-visit')
var position = require('unist-util-position')
var generated = require('unist-util-generated')
Expand Down Expand Up @@ -52,6 +52,7 @@ function listItemContentIndent(tree, file) {
var char
var diff
var reason
var abs

if (generated(item)) {
return
Expand Down Expand Up @@ -83,15 +84,16 @@ function listItemContentIndent(tree, file) {
// Warn for violating children.
if (column !== style) {
diff = style - column
abs = Math.abs(diff)

reason =
'Don’t use mixed indentation for children, ' +
/* istanbul ignore next - hard to test, I couldn’t find it at least. */
(diff > 0 ? 'add' : 'remove') +
' ' +
Math.abs(diff) +
abs +
' ' +
plural('space', diff)
plural('space', abs)

file.message(reason, {
line: start(item).line,
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-lint-list-item-content-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"index.js"
],
"dependencies": {
"plur": "^3.0.0",
"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": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
8 changes: 5 additions & 3 deletions packages/remark-lint-list-item-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
'use strict'

var rule = require('unified-lint-rule')
var plural = require('plur')
var plural = require('pluralize')
var visit = require('unist-util-visit')
var position = require('unist-util-position')
var generated = require('unist-util-generated')
Expand Down Expand Up @@ -146,6 +146,7 @@ function listItemIndent(tree, file, option) {
var style
var diff
var reason
var abs

marker = contents
.slice(start(item).offset, final.offset)
Expand All @@ -160,14 +161,15 @@ function listItemIndent(tree, file, option) {

if (marker.length !== style) {
diff = style - marker.length
abs = Math.abs(diff)

reason =
'Incorrect list-item indent: ' +
(diff > 0 ? 'add' : 'remove') +
' ' +
Math.abs(diff) +
abs +
' ' +
plural('space', diff)
plural('space', abs)

file.message(reason, final)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-lint-list-item-indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"index.js"
],
"dependencies": {
"plur": "^3.0.0",
"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": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-list-item-spacing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-maximum-heading-length/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"mdast-util-to-string": "^1.0.2",
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-maximum-line-length/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.4.0"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"unified-lint-rule": "^1.0.0",
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-visit": "^1.1.1",
"vfile-location": "^2.0.1"
"unist-util-visit": "^2.0.0",
"vfile-location": "^3.0.0"
},
"xo": false
}
4 changes: 2 additions & 2 deletions packages/remark-lint-no-consecutive-blank-lines/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'use strict'

var rule = require('unified-lint-rule')
var plural = require('plur')
var plural = require('pluralize')
var visit = require('unist-util-visit')
var position = require('unist-util-position')
var generated = require('unist-util-generated')
Expand Down Expand Up @@ -102,7 +102,7 @@ function noConsecutiveBlankLines(tree, file) {
'Remove ' +
lines +
' ' +
plural('line', lines) +
plural('line', Math.abs(lines)) +
' ' +
(diff > 0 ? 'before' : 'after') +
' node'
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-lint-no-consecutive-blank-lines/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"index.js"
],
"dependencies": {
"plur": "^3.0.0",
"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": "^1.1.1"
"unist-util-visit": "^2.0.0"
},
"xo": false
}
2 changes: 1 addition & 1 deletion packages/remark-lint-no-duplicate-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"unist-util-generated": "^1.1.0",
"unist-util-position": "^3.0.0",
"unist-util-stringify-position": "^2.0.0",
"unist-util-visit": "^1.4.0"
"unist-util-visit": "^2.0.0"
},
"xo": false
}

0 comments on commit 6e92eed

Please sign in to comment.