Skip to content

Commit

Permalink
Refactor to use @imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 27, 2024
1 parent b01865b commit ac9a800
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/check-files.node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @typedef {import('./index.js').Landmarks} Landmarks
* @import {Landmarks} from './index.js'
*/

import {constants, promises as fs} from 'node:fs'
Expand Down
4 changes: 2 additions & 2 deletions lib/find-repo.node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {import('vfile').VFile} VFile
* @typedef {import('../index.js').Options} Options
* @import {Options} from 'remark-validate-links'
* @import {VFile} from 'vfile'
*/

import path from 'node:path'
Expand Down
11 changes: 4 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/// <reference types="mdast-util-to-hast" />

/**
* @typedef {import('hosted-git-info').Hosts} Hosts
* @typedef {import('mdast').Nodes} Nodes
* @typedef {import('mdast').Resource} Resource
* @typedef {import('mdast').Root} Root
* @typedef {import('unified-engine').FileSet} FileSet
* @import {Hosts} from 'hosted-git-info'
* @import {} from 'mdast-util-to-hast'
* @import {Nodes, Resource, Root} from 'mdast'
* @import {FileSet} from 'unified-engine'
*/

/**
Expand Down
3 changes: 1 addition & 2 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* @typedef {import('node:child_process').ExecException} ExecException
* Exec error.
* @import {ExecException} from 'node:child_process'
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions test/sort.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('vfile').VFile} VFile
* @import {Root} from 'mdast'
* @import {VFile} from 'vfile'
*/

import {compareMessage} from 'vfile-sort'
Expand Down

0 comments on commit ac9a800

Please sign in to comment.