Update dev-dependencies

This commit is contained in:
Titus Wormer 2022-09-09 20:17:08 +02:00
parent 1ab55098cc
commit f9a82c73d3
No known key found for this signature in database
GPG Key ID: E6E581152ED04E2E
5 changed files with 8 additions and 8 deletions

View File

@ -22,5 +22,5 @@ jobs:
- ubuntu-latest
- windows-latest
node:
- lts/erbium
- lts/ferium
- lts/*

View File

@ -120,12 +120,12 @@
"parse-author": "^2.0.0",
"prettier": "^2.0.0",
"remark": "^14.0.0",
"remark-cli": "^10.0.0",
"remark-cli": "^11.0.0",
"remark-comment-config": "^7.0.0",
"remark-gfm": "^3.0.0",
"remark-github": "^11.0.0",
"remark-toc": "^8.0.0",
"remark-validate-links": "^11.0.0",
"remark-validate-links": "^12.0.0",
"rimraf": "^3.0.0",
"strip-indent": "^4.0.0",
"tape": "^5.0.0",
@ -135,7 +135,7 @@
"typescript": "~4.4.0",
"unist-builder": "^3.0.0",
"unist-util-remove-position": "^4.0.0",
"xo": "^0.48.0"
"xo": "^0.52.0"
},
"scripts": {
"build-packages": "node script/build-presets && node script/build-rules",

View File

@ -3,7 +3,7 @@ import type {VFile} from 'vfile'
import type {Plugin} from 'unified'
import type {Label, Severity} from './lib/index.js'
export interface RuleMeta {
export type RuleMeta = {
/**
* Name of the lint rule
*/
@ -29,4 +29,4 @@ export type Rule<Tree extends Node = Node, Options = unknown> = (
options: Options
) => Promise<Tree | undefined | void> | Tree | undefined | void
export {Severity, Label} from './lib/index.js'
export type {Severity, Label} from './lib/index.js'

View File

@ -31,7 +31,7 @@ export function rule(filePath) {
const ruleId = path.basename(filePath).slice('remark-lint-'.length)
/** @type {Record<string, Checks>} */
const tests = {}
const code = fs.readFileSync(path.join(filePath, 'index.js'), 'utf-8')
const code = fs.readFileSync(path.join(filePath, 'index.js'), 'utf8')
const fileInfo = parse(code, {spacing: 'preserve'})[0]
const tags = fileInfo.tags
const moduleTag = tags.find((d) => d.tag === 'module')

View File

@ -429,7 +429,7 @@ function normalize(messages) {
* @returns {Array<string>}
*/
function asStrings(messages) {
return messages.map((message) => String(message))
return messages.map(String)
}
/**