Skip to content

Commit b173b45

Browse files
committed
Update dev-dependencies
1 parent 54da09b commit b173b45

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
coverage/
22
mdast-util-compact.js
33
mdast-util-compact.min.js
4+
*.json
5+
*.md

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ function compact(tree, commonmark) {
1212

1313
function visitor(child, index, parent) {
1414
var siblings = parent ? parent.children : []
15-
var prev = index && siblings[index - 1]
15+
var previous = index && siblings[index - 1]
1616

1717
if (
18-
prev &&
19-
child.type === prev.type &&
20-
mergeable(prev, commonmark) &&
18+
previous &&
19+
child.type === previous.type &&
20+
mergeable(previous, commonmark) &&
2121
mergeable(child, commonmark)
2222
) {
2323
if (child.value) {
24-
prev.value += child.value
24+
previous.value += child.value
2525
}
2626

2727
if (child.children) {
28-
prev.children = prev.children.concat(child.children)
28+
previous.children = previous.children.concat(child.children)
2929
}
3030

3131
siblings.splice(index, 1)
3232

33-
if (prev.position && child.position) {
34-
prev.position.end = child.position.end
33+
if (previous.position && child.position) {
34+
previous.position.end = child.position.end
3535
}
3636

3737
return index

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
"devDependencies": {
3333
"browserify": "^16.0.0",
3434
"nyc": "^15.0.0",
35-
"prettier": "^1.0.0",
36-
"remark-cli": "^7.0.0",
37-
"remark-preset-wooorm": "^6.0.0",
38-
"tape": "^4.0.0",
35+
"prettier": "^2.0.0",
36+
"remark-cli": "^8.0.0",
37+
"remark-preset-wooorm": "^7.0.0",
38+
"tape": "^5.0.0",
3939
"tinyify": "^2.0.0",
4040
"unist-builder": "^2.0.0",
41-
"xo": "^0.26.0"
41+
"xo": "^0.32.0"
4242
},
4343
"scripts": {
44-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
44+
"format": "remark . -qfo && prettier . --write && xo --fix",
4545
"build-bundle": "browserify . -s mdastUtilCompact > mdast-util-compact.js",
4646
"build-mangle": "browserify . -s mdastUtilCompact -p tinyify > mdast-util-compact.min.js",
4747
"build": "npm run build-bundle && npm run build-mangle",

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var test = require('tape')
44
var u = require('unist-builder')
55
var compact = require('.')
66

7-
test('compact()', function(t) {
7+
test('compact()', function (t) {
88
t.same(
99
compact(
1010
u('paragraph', [u('text', 'alpha'), u('text', ' '), u('text', 'bravo')])

0 commit comments

Comments
 (0)