Skip to content

Commit a709298

Browse files
committed
Update dev-dependencies
1 parent de422f0 commit a709298

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

.prettierignore

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

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
"browserify": "^16.0.0",
3636
"hastscript": "^5.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.27.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 hastUtilFindAndReplace > hast-util-find-and-replace.js",
4848
"build-mangle": "browserify . -s hastUtilFindAndReplace -p tinyify > hast-util-find-and-replace.min.js",
4949
"build": "npm run build-bundle && npm run build-mangle",

test.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var test = require('tape')
44
var h = require('hastscript')
55
var findAndReplace = require('.')
66

7-
test('findAndReplace', function(t) {
7+
test('findAndReplace', function (t) {
88
t.throws(
9-
function() {
9+
function () {
1010
findAndReplace(create(), true)
1111
},
1212
/^Error: Expected array or object as schema$/,
@@ -42,7 +42,7 @@ test('findAndReplace', function(t) {
4242
)
4343

4444
t.deepEqual(
45-
findAndReplace(create(), /em(\w+)is/, function($0, $1) {
45+
findAndReplace(create(), /em(\w+)is/, function ($0, $1) {
4646
return '[' + $1 + ']'
4747
}),
4848
h('p', [
@@ -58,7 +58,7 @@ test('findAndReplace', function(t) {
5858
)
5959

6060
t.deepEqual(
61-
findAndReplace(create(), 'emphasis', function() {
61+
findAndReplace(create(), 'emphasis', function () {
6262
return h('a', h('b', 'c'))
6363
}),
6464
h('p', [
@@ -122,7 +122,7 @@ test('findAndReplace', function(t) {
122122

123123
t.deepEqual(
124124
findAndReplace(create(), {
125-
emphasis: function() {
125+
emphasis: function () {
126126
return h('a', 'importance')
127127
},
128128
importance: 'something else'
@@ -168,13 +168,13 @@ test('findAndReplace', function(t) {
168168

169169
t.deepEqual(
170170
findAndReplace(h('p', 'Some emphasis, importance, and code.'), {
171-
importance: function(match) {
171+
importance: function (match) {
172172
return h('strong', match)
173173
},
174-
code: function(match) {
174+
code: function (match) {
175175
return h('code', match)
176176
},
177-
emphasis: function(match) {
177+
emphasis: function (match) {
178178
return h('em', match)
179179
}
180180
}),
@@ -186,19 +186,19 @@ test('findAndReplace', function(t) {
186186
findAndReplace(h('p', 'Some emphasis, importance, and code.'), [
187187
[
188188
/importance/g,
189-
function(match) {
189+
function (match) {
190190
return h('strong', match)
191191
}
192192
],
193193
[
194194
/code/g,
195-
function(match) {
195+
function (match) {
196196
return h('code', match)
197197
}
198198
],
199199
[
200200
/emphasis/g,
201-
function(match) {
201+
function (match) {
202202
return h('em', match)
203203
}
204204
]
@@ -224,7 +224,7 @@ test('findAndReplace', function(t) {
224224
)
225225

226226
t.deepEqual(
227-
findAndReplace(create(), 'and', function() {
227+
findAndReplace(create(), 'and', function () {
228228
return h('script', 'alert(1)')
229229
}),
230230
h('p', [

0 commit comments

Comments
 (0)