Skip to content

Commit 0e49f17

Browse files
committed
Update dev-dependencies
1 parent f395dd7 commit 0e49f17

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function unknown(value) {
3131
}
3232

3333
function toXast(tree, options) {
34-
var opts = typeof options === 'string' ? {space: options} : options || {}
35-
var space = opts.space === 'svg' ? 'svg' : 'html'
34+
var settings = typeof options === 'string' ? {space: options} : options || {}
35+
var space = settings.space === 'svg' ? 'svg' : 'html'
3636

3737
return one(tree, {schema: space === 'svg' ? svg : html, ns: null})
3838
}

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
"devDependencies": {
4141
"hastscript": "^5.0.0",
4242
"nyc": "^15.0.0",
43-
"prettier": "^1.0.0",
44-
"remark-cli": "^7.0.0",
45-
"remark-preset-wooorm": "^6.0.0",
43+
"prettier": "^2.0.0",
44+
"remark-cli": "^8.0.0",
45+
"remark-preset-wooorm": "^7.0.0",
4646
"tape": "^4.0.0",
4747
"unist-builder": "^2.0.0",
4848
"xastscript": "^1.0.0",
49-
"xo": "^0.27.0"
49+
"xo": "^0.29.0"
5050
},
5151
"scripts": {
5252
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
@@ -72,6 +72,7 @@
7272
"prettier": true,
7373
"esnext": false,
7474
"rules": {
75+
"unicorn/prefer-number-properties": "off",
7576
"unicorn/prefer-includes": "off",
7677
"no-self-compare": "off",
7778
"guard-for-in": "off"

test.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ var s = require('hastscript/svg')
88
var x = require('xastscript')
99
var toXast = require('.')
1010

11-
test('toXast', function(t) {
12-
t.test('main', function(t) {
11+
test('toXast', function (t) {
12+
t.test('main', function (t) {
1313
t.equal(typeof toXast, 'function', 'should expose a function')
1414

1515
t.throws(
16-
function() {
16+
function () {
1717
toXast()
1818
},
1919
/Error: Expected node, not `undefined`/,
2020
'should throw without node'
2121
)
2222

2323
t.throws(
24-
function() {
24+
function () {
2525
toXast({type: 'raw', value: '<script>alert(1)</script>'})
2626
},
2727
/Error: Cannot transform node of type `raw`/,
@@ -69,7 +69,7 @@ test('toXast', function(t) {
6969
t.end()
7070
})
7171

72-
t.test('root', function(t) {
72+
t.test('root', function (t) {
7373
t.deepEqual(
7474
toXast(u('root', [h('div', 'Alpha')])),
7575
u('root', [x('div', {xmlns: ns.html}, 'Alpha')]),
@@ -79,7 +79,7 @@ test('toXast', function(t) {
7979
t.end()
8080
})
8181

82-
t.test('text', function(t) {
82+
t.test('text', function (t) {
8383
t.deepEqual(
8484
toXast(u('text', 'Alpha')),
8585
u('text', 'Alpha'),
@@ -95,7 +95,7 @@ test('toXast', function(t) {
9595
t.end()
9696
})
9797

98-
t.test('comment', function(t) {
98+
t.test('comment', function (t) {
9999
t.deepEqual(
100100
toXast(u('comment', 'Alpha')),
101101
u('comment', 'Alpha'),
@@ -111,7 +111,7 @@ test('toXast', function(t) {
111111
t.end()
112112
})
113113

114-
t.test('doctype', function(t) {
114+
t.test('doctype', function (t) {
115115
t.deepEqual(
116116
toXast(u('doctype', {name: 'a'})),
117117
u('doctype', {name: 'a', public: undefined, system: undefined}),
@@ -127,7 +127,7 @@ test('toXast', function(t) {
127127
t.end()
128128
})
129129

130-
t.test('element', function(t) {
130+
t.test('element', function (t) {
131131
t.deepEqual(
132132
toXast(h('p', [h('a', 'A'), ' & ', h('b', 'B'), '.'])),
133133
x('p', {xmlns: ns.html}, [x('a', 'A'), ' & ', x('b', 'B'), '.']),
@@ -170,7 +170,7 @@ test('toXast', function(t) {
170170
t.end()
171171
})
172172

173-
t.test('attributes', function(t) {
173+
t.test('attributes', function (t) {
174174
t.deepEqual(
175175
toXast(u('element', {tagName: 'br'}, [])),
176176
x('br', {xmlns: ns.html}),
@@ -306,7 +306,7 @@ test('toXast', function(t) {
306306
t.end()
307307
})
308308

309-
t.test('svg', function(t) {
309+
t.test('svg', function (t) {
310310
t.deepEqual(
311311
toXast(
312312
s(
@@ -406,7 +406,7 @@ test('toXast', function(t) {
406406
t.end()
407407
})
408408

409-
t.test('mathml', function(t) {
409+
t.test('mathml', function (t) {
410410
t.deepEqual(
411411
toXast(
412412
u('element', {tagName: 'p', properties: {}}, [

0 commit comments

Comments
 (0)