Skip to content

Commit aaf6b7e

Browse files
committed
Update dev-dependencies
1 parent 4fc9b07 commit aaf6b7e

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
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-find-before.js
33
unist-util-find-before.min.js
4+
*.json
5+
*.md

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@
3131
"devDependencies": {
3232
"browserify": "^16.0.0",
3333
"nyc": "^15.0.0",
34-
"prettier": "^1.0.0",
35-
"remark": "^11.0.0",
36-
"remark-cli": "^7.0.0",
37-
"remark-preset-wooorm": "^6.0.0",
38-
"tape": "^4.0.0",
34+
"prettier": "^2.0.0",
35+
"remark": "^12.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",
40-
"xo": "^0.25.0"
40+
"xo": "^0.32.0"
4141
},
4242
"scripts": {
43-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
43+
"format": "remark . -qfo && prettier . --write && xo --fix",
4444
"build-bundle": "browserify . -s unistUtilFindBefore -o unist-util-find-before.js",
4545
"build-mangle": "browserify . -s unistUtilFindBefore -p tinyify -o unist-util-find-before.min.js",
4646
"build": "npm run build-bundle && npm run build-mangle",
@@ -65,6 +65,9 @@
6565
"xo": {
6666
"prettier": true,
6767
"esnext": false,
68+
"rules": {
69+
"unicorn/prefer-number-properties": "off"
70+
},
6871
"ignore": [
6972
"unist-util-find-before.js"
7073
]

test.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ var tree = remark().parse('Some *emphasis*, **importance**, and `code`.')
99
var paragraph = tree.children[0]
1010
var children = paragraph.children
1111

12-
test('unist-util-find-before', function(t) {
12+
test('unist-util-find-before', function (t) {
1313
t.throws(
14-
function() {
14+
function () {
1515
findBefore()
1616
},
1717
/Expected parent node/,
1818
'should fail without parent'
1919
)
2020

2121
t.throws(
22-
function() {
22+
function () {
2323
findBefore({
2424
type: 'foo'
2525
})
@@ -28,22 +28,22 @@ test('unist-util-find-before', function(t) {
2828
'should fail without parent node'
2929
)
3030

31-
t.doesNotThrow(function() {
32-
assert.throws(function() {
31+
t.doesNotThrow(function () {
32+
assert.throws(function () {
3333
findBefore({type: 'foo', children: []})
3434
}, /Expected positive finite index or child node/)
3535

36-
assert.throws(function() {
36+
assert.throws(function () {
3737
findBefore({type: 'foo', children: []}, -1)
3838
}, /Expected positive finite index or child node/)
3939

40-
assert.throws(function() {
40+
assert.throws(function () {
4141
findBefore({type: 'foo', children: []}, {type: 'bar'})
4242
}, /Expected positive finite index or child node/)
4343
}, 'should fail without index')
4444

45-
t.doesNotThrow(function() {
46-
assert.throws(function() {
45+
t.doesNotThrow(function () {
46+
assert.throws(function () {
4747
findBefore(
4848
{
4949
type: 'foo',
@@ -54,7 +54,7 @@ test('unist-util-find-before', function(t) {
5454
)
5555
}, /Expected function, string, or object as test/)
5656

57-
assert.throws(function() {
57+
assert.throws(function () {
5858
findBefore(
5959
{
6060
type: 'foo',
@@ -66,13 +66,13 @@ test('unist-util-find-before', function(t) {
6666
}, /Expected function, string, or object as test/)
6767
}, 'should fail for invalid `test`')
6868

69-
t.doesNotThrow(function() {
69+
t.doesNotThrow(function () {
7070
assert.strictEqual(findBefore(paragraph, children[1]), children[0])
7171
assert.strictEqual(findBefore(paragraph, 1), children[0])
7272
assert.strictEqual(findBefore(paragraph, 0), null)
7373
}, 'should return the preceding node when without `test`')
7474

75-
t.doesNotThrow(function() {
75+
t.doesNotThrow(function () {
7676
assert.strictEqual(findBefore(paragraph, 100, children[0]), children[0])
7777
assert.strictEqual(
7878
findBefore(paragraph, children[1], children[0]),
@@ -84,7 +84,7 @@ test('unist-util-find-before', function(t) {
8484
assert.strictEqual(findBefore(paragraph, 1, children[1]), null)
8585
}, 'should return `node` when given a `node` and existing')
8686

87-
t.doesNotThrow(function() {
87+
t.doesNotThrow(function () {
8888
assert.strictEqual(findBefore(paragraph, 100, 'strong'), children[3])
8989
assert.strictEqual(findBefore(paragraph, 3, 'strong'), null)
9090
assert.strictEqual(
@@ -94,7 +94,7 @@ test('unist-util-find-before', function(t) {
9494
assert.strictEqual(findBefore(paragraph, children[3], 'strong'), null)
9595
}, 'should return a child when given a `type` and existing')
9696

97-
t.doesNotThrow(function() {
97+
t.doesNotThrow(function () {
9898
assert.strictEqual(findBefore(paragraph, 100, test), children[3])
9999
assert.strictEqual(findBefore(paragraph, 3, test), null)
100100
assert.strictEqual(findBefore(paragraph, children[4], test), children[3])

0 commit comments

Comments
 (0)