Skip to content

Commit e3d3187

Browse files
committed
Update dev-dependencies
1 parent e9106a3 commit e3d3187

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
coverage/
2+
*.json
3+
*.md

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ var convert = require('unist-util-is/convert')
44

55
module.exports = remove
66

7-
function remove(ast, opts, test) {
7+
function remove(ast, options, test) {
88
var is
99
var cascade
1010

1111
if (!test) {
12-
test = opts
13-
opts = {}
12+
test = options
13+
options = {}
1414
}
1515

16-
cascade = opts.cascade
16+
cascade = options.cascade
1717
cascade = cascade === null || cascade === undefined ? true : cascade
1818
is = convert(test)
1919

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
},
3838
"devDependencies": {
3939
"nyc": "^15.0.0",
40-
"prettier": "^1.0.0",
41-
"remark-cli": "^7.0.0",
42-
"remark-preset-wooorm": "^6.0.0",
43-
"tape": "^4.0.0",
40+
"prettier": "^2.0.0",
41+
"remark-cli": "^8.0.0",
42+
"remark-preset-wooorm": "^7.0.0",
43+
"tape": "^5.0.0",
4444
"unist-builder": "^2.0.0",
45-
"xo": "^0.25.0"
45+
"xo": "^0.32.0"
4646
},
4747
"scripts": {
48-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
48+
"format": "remark . -qfo && prettier . --write && xo --fix",
4949
"test-api": "node test",
5050
"test-coverage": "nyc --reporter lcov tape test.js",
5151
"test": "npm run format && npm run test-coverage"

test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var test = require('tape')
44
var u = require('unist-builder')
55
var remove = require('.')
66

7-
test('should compare nodes by partial properties', function(t) {
7+
test('should compare nodes by partial properties', function (t) {
88
var tree = u('node', [u('leaf', '1'), u('leaf', '2')])
99
var children = tree.children
1010
var first = tree.children[0]
@@ -19,7 +19,7 @@ test('should compare nodes by partial properties', function(t) {
1919
t.end()
2020
})
2121

22-
test('should remove nodes with children', function(t) {
22+
test('should remove nodes with children', function (t) {
2323
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
2424
var children = tree.children
2525
var first = tree.children[0]
@@ -39,15 +39,15 @@ test('should remove nodes with children', function(t) {
3939
}
4040
})
4141

42-
test('should return `null` if root node is removed', function(t) {
42+
test('should return `null` if root node is removed', function (t) {
4343
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
4444

4545
t.equal(remove(tree, 'root'), null)
4646

4747
t.end()
4848
})
4949

50-
test('should cascade-remove parent nodes', function(t) {
50+
test('should cascade-remove parent nodes', function (t) {
5151
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
5252
var children = tree.children
5353
var first = children[0].children[0]
@@ -67,7 +67,7 @@ test('should cascade-remove parent nodes', function(t) {
6767
}
6868
})
6969

70-
test('should cascade-remove root nodes', function(t) {
70+
test('should cascade-remove root nodes', function (t) {
7171
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
7272

7373
var next = remove(tree, 'leaf')
@@ -77,7 +77,7 @@ test('should cascade-remove root nodes', function(t) {
7777
t.end()
7878
})
7979

80-
test('should not cascade-remove nodes that were empty initially', function(t) {
80+
test('should not cascade-remove nodes that were empty initially', function (t) {
8181
var tree = u('node', [u('node', []), u('node', [u('leaf')])])
8282

8383
remove(tree, 'leaf')
@@ -87,7 +87,7 @@ test('should not cascade-remove nodes that were empty initially', function(t) {
8787
t.end()
8888
})
8989

90-
test('should support type tests', function(t) {
90+
test('should support type tests', function (t) {
9191
var tree = u('node', [u('node', [u('leaf', '1')]), u('leaf', '2')])
9292

9393
remove(tree, {cascade: false}, 'leaf')
@@ -97,7 +97,7 @@ test('should support type tests', function(t) {
9797
t.end()
9898
})
9999

100-
test('should support function tests', function(t) {
100+
test('should support function tests', function (t) {
101101
var tree = u('node', [u('node', [u('leaf', '1')]), u('leaf', '2')])
102102

103103
remove(tree, {cascade: false}, test)
@@ -111,7 +111,7 @@ test('should support function tests', function(t) {
111111
}
112112
})
113113

114-
test('opts.cascade = true', function(t) {
114+
test('opts.cascade = true', function (t) {
115115
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
116116

117117
var next = remove(tree, {cascade: true}, 'leaf')
@@ -121,7 +121,7 @@ test('opts.cascade = true', function(t) {
121121
t.end()
122122
})
123123

124-
test('opts.cascade = false', function(t) {
124+
test('opts.cascade = false', function (t) {
125125
var tree = u('root', [u('node', [u('leaf', '1')]), u('leaf', '2')])
126126
var siblings = tree.children
127127
var node = siblings[0]
@@ -138,7 +138,7 @@ test('opts.cascade = false', function(t) {
138138
t.end()
139139
})
140140

141-
test('example from readme', function(t) {
141+
test('example from readme', function (t) {
142142
var tree = u('root', [
143143
u('leaf', '1'),
144144
u('node', [

0 commit comments

Comments
 (0)