Skip to content

Commit

Permalink
Update xo
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 9, 2021
1 parent b579e27 commit 78871b0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/check/check-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @typedef {import('../types.js').References} References
*/

import {constants, promises as fs} from 'fs'
import {constants, promises as fs} from 'node:fs'

/**
* @param {{files: VFile[], landmarks: Landmarks, references: References}} ctx
Expand Down
2 changes: 1 addition & 1 deletion lib/check/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @typedef {import('../types.js').ReferenceMap} ReferenceMap
*/

import path from 'path'
import path from 'node:path'
// @ts-expect-error: untyped.
import propose from 'propose'
import {constants} from '../constants.js'
Expand Down
8 changes: 5 additions & 3 deletions lib/find/find-references.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* @typedef {import('../index.js').Options} Options
*/

import {promises as fs} from 'fs'
import path from 'path'
import {URL} from 'url'
import {promises as fs} from 'node:fs'
import path from 'node:path'
import {URL} from 'node:url'
import {toVFile} from 'to-vfile'
import {visit} from 'unist-util-visit'
import {toString} from 'mdast-util-to-string'
Expand Down Expand Up @@ -49,6 +49,8 @@ export async function findReferences(ctx) {
/** @type {Landmarks} */
const landmarks = Object.create(null)
const config = {
// Always set at this point.
/* c8 ignore next */
urlConfig: ctx.options.urlConfig || {},
path: absolute,
base: absolute ? path.dirname(absolute) : file.cwd,
Expand Down
6 changes: 3 additions & 3 deletions lib/find/find-repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* @typedef {import('../index.js').Options} Options
*/

import path from 'path'
import {promisify} from 'util'
import {exec as execCb} from 'child_process'
import path from 'node:path'
import {promisify} from 'node:util'
import {exec as execCb} from 'node:child_process'

const exec = promisify(execCb)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"vfile-sort": "^3.0.0",
"xo": "^0.39.0"
"xo": "^0.44.0"
},
"scripts": {
"build": "rimraf \"lib/**/*.d.ts\" \"test/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage",
Expand Down
11 changes: 6 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import fs from 'fs'
import path from 'path'
import {promisify} from 'util'
import childProcess from 'child_process'
import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'
import {promisify} from 'node:util'
import childProcess from 'node:child_process'
import test from 'tape'
import {readSync} from 'to-vfile'
import {remark} from 'remark'
import strip from 'strip-ansi'
import rimraf from 'rimraf'
import sort from './sort.js'
import links from '../index.js'
import sort from './sort.js'

const exec = promisify(childProcess.exec)

Expand Down

0 comments on commit 78871b0

Please sign in to comment.