Skip to content

Commit 3d50462

Browse files
committed
Update xo
1 parent 591b0c0 commit 3d50462

File tree

6 files changed

+243
-212
lines changed

6 files changed

+243
-212
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"tsd": "^0.17.0",
6767
"type-coverage": "^2.0.0",
6868
"typescript": "^4.0.0",
69-
"xo": "^0.39.0"
69+
"xo": "^0.42.0"
7070
},
7171
"scripts": {
7272
"build": "rimraf \"test/**/*.d.ts\" && tsc && tsd && type-coverage",

test/async-function.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ test('async function transformer () {}', (t) => {
1010
t.plan(5)
1111

1212
unified()
13-
.use(() => {
14-
return async function () {}
15-
})
16-
.use(() => {
17-
return async function () {
18-
return undefined
19-
}
20-
})
21-
.use(() => {
22-
return async function (tree, file) {
23-
t.equal(tree, givenNode, 'passes correct tree to an async function')
24-
t.equal(file, givenFile, 'passes correct file to an async function')
25-
return modifiedNode
26-
}
27-
})
13+
.use(() => async function () {})
14+
.use(
15+
() =>
16+
async function () {
17+
return undefined
18+
}
19+
)
20+
.use(
21+
() =>
22+
async function (tree, file) {
23+
t.equal(tree, givenNode, 'passes correct tree to an async function')
24+
t.equal(file, givenFile, 'passes correct file to an async function')
25+
return modifiedNode
26+
}
27+
)
2828
.run(givenNode, givenFile, (error, tree, file) => {
2929
t.error(error, 'should’t fail')
3030
t.equal(tree, modifiedNode, 'passes given tree to `done`')

test/freeze.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import test from 'tape'
6-
import {SimpleCompiler, SimpleParser} from './util/simple.js'
76
import {unified} from '../index.js'
7+
import {SimpleCompiler, SimpleParser} from './util/simple.js'
88

99
test('freeze()', (t) => {
1010
const frozen = unified()

test/process.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import test from 'tape'
99
import {VFile} from 'vfile'
10-
import {SimpleCompiler, SimpleParser} from './util/simple.js'
1110
import {unified} from '../index.js'
11+
import {SimpleCompiler, SimpleParser} from './util/simple.js'
1212

1313
test('process(file, done)', (t) => {
1414
const givenFile = new VFile('alpha')
@@ -45,12 +45,13 @@ test('process(file, done)', (t) => {
4545
}
4646
})
4747
})
48-
.use(() => {
49-
return function (tree, file) {
50-
t.equal(tree, givenNode, 'should pass `tree` to transformers')
51-
t.equal(file, givenFile, 'should pass `file` to transformers')
52-
}
53-
})
48+
.use(
49+
() =>
50+
function (tree, file) {
51+
t.equal(tree, givenNode, 'should pass `tree` to transformers')
52+
t.equal(file, givenFile, 'should pass `file` to transformers')
53+
}
54+
)
5455
.use(function () {
5556
Object.assign(this, {
5657
/** @type {Compiler} */
@@ -99,12 +100,13 @@ test('process(file)', (t) => {
99100
}
100101
})
101102
})
102-
.use(() => {
103-
return function (tree, file) {
104-
t.equal(tree, givenNode, 'should pass `tree` to transformers')
105-
t.equal(file, givenFile, 'should pass `file` to transformers')
106-
}
107-
})
103+
.use(
104+
() =>
105+
function (tree, file) {
106+
t.equal(tree, givenNode, 'should pass `tree` to transformers')
107+
t.equal(file, givenFile, 'should pass `file` to transformers')
108+
}
109+
)
108110
.use(function () {
109111
Object.assign(this, {
110112
/** @type {Compiler} */

0 commit comments

Comments
 (0)