Skip to content

Commit a379fb4

Browse files
committed
Update dev-dependencies
1 parent fd50771 commit a379fb4

File tree

11 files changed

+69
-64
lines changed

11 files changed

+69
-64
lines changed

.prettierignore

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

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
"browserify": "^16.0.0",
3636
"dtslint": "^3.0.0",
3737
"nyc": "^15.0.0",
38-
"prettier": "^1.0.0",
39-
"remark-cli": "^7.0.0",
40-
"remark-preset-wooorm": "^6.0.0",
41-
"tape": "^4.0.0",
38+
"prettier": "^2.0.0",
39+
"remark-cli": "^8.0.0",
40+
"remark-preset-wooorm": "^7.0.0",
41+
"tape": "^5.0.0",
4242
"tinyify": "^2.0.0",
43-
"xo": "^0.26.0"
43+
"xo": "^0.32.0"
4444
},
4545
"scripts": {
46-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
46+
"format": "remark . -qfo && prettier . --write && xo --fix",
4747
"build-bundle": "browserify . -s unistUtilAssert > unist-util-assert.js",
4848
"build-mangle": "browserify . -s unistUtilAssert -p tinyify > unist-util-assert.min.js",
4949
"build": "npm run build-bundle && npm run build-mangle",
@@ -64,10 +64,13 @@
6464
"prettier": true,
6565
"esnext": false,
6666
"rules": {
67+
"unicorn/prefer-optional-catch-binding": "off",
68+
"unicorn/prefer-set-has": "off",
6769
"no-eq-null": "off",
6870
"eqeqeq": "off"
6971
},
7072
"ignores": [
73+
"types/",
7174
"unist-util-assert.js"
7275
]
7376
},

test/children.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('children', function(t) {
6+
test('children', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert({type: 'foo', children: {alpha: 'bravo'}})
1010
},
1111
/`children` should be an array: `{ type: 'foo', children: { alpha: 'bravo' } }`$/,
1212
'should throw if given a non-node child in children'
1313
)
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
assert({type: 'foo', children: ['one']})
1818
},
1919
/node should be an object: `'one'` in `{ type: 'foo', children: \[ 'one' ] }`$/,
2020
'should throw if given a non-node child in children'
2121
)
2222

23-
t.doesNotThrow(function() {
23+
t.doesNotThrow(function () {
2424
assert({type: 'parent', children: [{type: 'text', value: 'alpha'}]})
2525
}, 'should not throw on vald children')
2626

2727
t.throws(
28-
function() {
28+
function () {
2929
assert({
3030
type: 'foo',
3131
children: [

test/node.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('node', function(t) {
6+
test('node', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert()
1010
},
1111
/node should be an object: `undefined`$/,
1212
'should throw if not given a node (#1)'
1313
)
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
assert(null)
1818
},
1919
/node should be an object: `null`$/,
2020
'should throw if not given a node (#2)'
2121
)
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
assert('foo')
2626
},
2727
/node should be an object: `'foo'`$/,
2828
'should throw if given a non-node (#1)'
2929
)
3030

3131
t.throws(
32-
function() {
32+
function () {
3333
assert(6)
3434
},
3535
/node should be an object: `6`$/,

test/non-defined.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('non-defined', function(t) {
7-
t.doesNotThrow(function() {
6+
test('non-defined', function (t) {
7+
t.doesNotThrow(function () {
88
assert({
99
type: 'element',
1010
properties: {
@@ -20,7 +20,7 @@ test('non-defined', function(t) {
2020
}, 'should not throw if non-defined properties are found')
2121

2222
t.throws(
23-
function() {
23+
function () {
2424
assert({
2525
type: 'break',
2626
data: {foo: Function}

test/parent.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('assert.parent()', function(t) {
6+
test('assert.parent()', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert.parent({})
1010
},
1111
/node should have a type: `{}`$/,
1212
'should throw the same errors as `assert()`'
1313
)
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
assert.parent({type: 'text', value: 'foo'})
1818
},
1919
/parent should not have `value`: `{ type: 'text', value: 'foo' }`$/,
2020
'should throw if the given node has a `value`'
2121
)
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
assert.parent({type: 'break'})
2626
},
2727
/parent should have `children`: `{ type: 'break' }`$/,
2828
'should throw if the given node has `children`'
2929
)
3030

31-
t.doesNotThrow(function() {
31+
t.doesNotThrow(function () {
3232
assert.parent({type: 'strong', children: []})
3333
}, 'should not throw on valid void nodes')
3434

test/position.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,97 +3,97 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('position', function(t) {
6+
test('position', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert({type: 'foo', position: 1})
1010
},
1111
/`position` should be an object: `{ type: 'foo', position: 1 }`$/,
1212
'should throw if given a non-object `position`'
1313
)
1414

15-
t.doesNotThrow(function() {
15+
t.doesNotThrow(function () {
1616
assert({type: 'foo', position: null})
1717
}, 'should not throw if given a null `position`')
1818

19-
t.doesNotThrow(function() {
19+
t.doesNotThrow(function () {
2020
assert({type: 'foo', position: {}})
2121
}, 'should not throw if given an empty `position` object')
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
assert({type: 'foo', position: {start: 1}})
2626
},
2727
/`position.start` should be an object: `{ type: 'foo', position: { start: 1 } }`$/,
2828
'should throw if given a non-object `position.start`'
2929
)
3030

31-
t.doesNotThrow(function() {
31+
t.doesNotThrow(function () {
3232
assert({type: 'foo', position: {start: null}})
3333
}, 'should not throw if given a null `position.start`')
3434

35-
t.doesNotThrow(function() {
35+
t.doesNotThrow(function () {
3636
assert({type: 'foo', position: {start: {}}})
3737
}, 'should not throw if given an empty `position.start` object')
3838

3939
t.throws(
40-
function() {
40+
function () {
4141
assert({type: 'foo', position: {end: 1}})
4242
},
4343
/`position.end` should be an object: `{ type: 'foo', position: { end: 1 } }`$/,
4444
'should throw if given a non-object `position.end`'
4545
)
4646

47-
t.doesNotThrow(function() {
47+
t.doesNotThrow(function () {
4848
assert({type: 'foo', position: {end: null}})
4949
}, 'should not throw if given a null `position.end`')
5050

51-
t.doesNotThrow(function() {
51+
t.doesNotThrow(function () {
5252
assert({type: 'foo', position: {end: {}}})
5353
}, 'should not throw if given an empty `position.end` object')
5454

55-
t.doesNotThrow(function() {
55+
t.doesNotThrow(function () {
5656
assert({type: 'foo', position: {start: {line: null}}})
5757
}, 'should not throw if given a `position.start.line` to `null`')
5858

59-
t.doesNotThrow(function() {
59+
t.doesNotThrow(function () {
6060
assert({type: 'foo', position: {start: {column: null}}})
6161
}, 'should not throw if given a `position.start.column` to `null`')
6262

63-
t.doesNotThrow(function() {
63+
t.doesNotThrow(function () {
6464
assert({type: 'foo', position: {end: {line: null}}})
6565
}, 'should not throw if given a `position.end.line` to `null`')
6666

67-
t.doesNotThrow(function() {
67+
t.doesNotThrow(function () {
6868
assert({type: 'foo', position: {end: {column: null}}})
6969
}, 'should not throw if given a `position.end.column` to `null`')
7070

7171
t.throws(
72-
function() {
72+
function () {
7373
assert({type: 'foo', position: {start: {line: 0}}})
7474
},
7575
/`position.start.line` should be gte `1`: `{ type: 'foo', position: { start: { line: 0 } } }`$/,
7676
'should throw if `position.start.line` is less than 1'
7777
)
7878

7979
t.throws(
80-
function() {
80+
function () {
8181
assert({type: 'foo', position: {start: {column: 0}}})
8282
},
8383
/`position.start.column` should be gte `1`: `{ type: 'foo', position: { start: { column: 0 } } }`$/,
8484
'should throw if `position.start.column` is less than 1'
8585
)
8686

8787
t.throws(
88-
function() {
88+
function () {
8989
assert({type: 'foo', position: {end: {line: 0}}})
9090
},
9191
/`position.end.line` should be gte `1`: `{ type: 'foo', position: { end: { line: 0 } } }`$/,
9292
'should throw if `position.end.line` is less than 1'
9393
)
9494

9595
t.throws(
96-
function() {
96+
function () {
9797
assert({type: 'foo', position: {end: {column: 0}}})
9898
},
9999
/`position.end.column` should be gte `1`: `{ type: 'foo', position: { end: { column: 0 } } }`$/,

test/text.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('assert.text()', function(t) {
6+
test('assert.text()', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert.text({})
1010
},
1111
/node should have a type: `{}`$/,
1212
'should throw the same errors as `assert()`'
1313
)
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
assert.text({type: 'strong', children: []})
1818
},
1919
/text should not have `children`: `{ type: 'strong', children: \[] }`$/,
2020
'should throw if the given node has `children`'
2121
)
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
assert.text({type: 'break'})
2626
},
2727
/text should have `value`: `{ type: 'break' }`$/,
2828
'should throw if the given node has no `value`'
2929
)
3030

31-
t.doesNotThrow(function() {
31+
t.doesNotThrow(function () {
3232
assert.text({type: 'text', value: 'foo'})
3333
}, 'should not throw on valid text nodes')
3434

test/type.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@
33
var test = require('tape')
44
var assert = require('..')
55

6-
test('type', function(t) {
6+
test('type', function (t) {
77
t.throws(
8-
function() {
8+
function () {
99
assert([1, 5])
1010
},
1111
/node should have a type: `\[ 1, 5 ]`$/,
1212
'should throw if not given a `type` (#1)'
1313
)
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
assert({value: 'foo'})
1818
},
1919
/node should have a type: `{ value: 'foo' }`$/,
2020
'should throw if not given a type (#2)'
2121
)
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
assert({type: 1})
2626
},
2727
/`type` should be a string: `{ type: 1 }`$/,
2828
'should throw if not given a non-string type'
2929
)
3030

3131
t.throws(
32-
function() {
32+
function () {
3333
assert({type: ''})
3434
},
3535
/`type` should not be empty: `{ type: '' }`$/,
3636
'should throw if given an empty string type'
3737
)
3838

39-
t.doesNotThrow(function() {
39+
t.doesNotThrow(function () {
4040
assert({type: 'foo'})
4141
}, 'should not throw if given a non-empty type string')
4242

0 commit comments

Comments
 (0)