File tree 8 files changed +12
-13
lines changed
8 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 5
5
* @typedef {import('./options.js').Options } Options
6
6
*/
7
7
8
- import stream from 'stream'
8
+ import process from 'node:process'
9
+ import stream from 'node:stream'
9
10
import chalk from 'chalk'
10
11
import chokidar from 'chokidar'
11
12
import { engine } from 'unified-engine'
Original file line number Diff line number Diff line change @@ -193,9 +193,7 @@ function reporter(value) {
193
193
/**
194
194
* @returns {[string, Record<string, unknown>|undefined] }
195
195
*/
196
- ( value ) => {
197
- return [ value [ 0 ] , value [ 1 ] ? parseConfig ( value [ 1 ] , { } ) : undefined ]
198
- }
196
+ ( value ) => [ value [ 0 ] , value [ 1 ] ? parseConfig ( value [ 1 ] , { } ) : undefined ]
199
197
)
200
198
201
199
return all [ all . length - 1 ] || [ ]
@@ -351,8 +349,7 @@ function normalize(value) {
351
349
*/
352
350
function flatten ( values ) {
353
351
// @ts -expect-error: TS is wrong.
354
- // eslint-disable-next-line prefer-spread
355
- return [ ] . concat . apply ( [ ] , values )
352
+ return values . flat ( )
356
353
}
357
354
358
355
/**
Original file line number Diff line number Diff line change 58
58
"typescript" : " ^4.0.0" ,
59
59
"unified" : " ^10.0.0" ,
60
60
"vfile-reporter-json" : " ^3.0.0" ,
61
- "xo" : " ^0.39 .0"
61
+ "xo" : " ^0.44 .0"
62
62
},
63
63
"scripts" : {
64
64
"build" : " rimraf \" lib/**/*.d.ts\" \" test/**/*.d.ts\" && tsc && type-coverage" ,
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- import path from 'path'
2
+ import path from 'node: path'
3
3
import { args } from '../../../index.js'
4
4
import { processor } from '../processor.js'
5
5
import { config } from '../config.js'
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- import path from 'path'
2
+ import path from 'node: path'
3
3
import { args } from '../../../index.js'
4
4
import { processor } from '../processor.js'
5
5
import { config } from '../config.js'
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- import path from 'path'
2
+ import path from 'node: path'
3
3
import { args } from '../../../index.js'
4
4
import { processor } from '../processor.js'
5
5
import { config } from '../config.js'
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
- import path from 'path'
2
+ import path from 'node: path'
3
3
import { args } from '../../../index.js'
4
4
import { processor } from '../processor.js'
5
5
import { config } from '../config.js'
Original file line number Diff line number Diff line change 1
- import fs from 'fs'
2
- import path from 'path'
1
+ import fs from 'node:fs'
2
+ import path from 'node:path'
3
+ import process from 'node:process'
3
4
import execa from 'execa'
4
5
import { bail } from 'bail'
5
6
import test from 'tape'
You can’t perform that action at this time.
0 commit comments