chore: migrate from ESLint/Prettier to Oxc

This commit is contained in:
2026-02-05 17:29:13 +01:00
parent 075742e867
commit 12a22980ce
13 changed files with 561 additions and 2223 deletions
+3 -9
View File
@@ -116,8 +116,7 @@ const relativeLinksRule = {
const fileContent = fs.readFileSync(url, { encoding: "utf8" })
const headings = getMarkdownHeadings(fileContent)
const idOrAnchorNameHTMLFragments =
getMarkdownIdOrAnchorNameFragments(fileContent)
const idOrAnchorNameHTMLFragments = getMarkdownIdOrAnchorNameFragments(fileContent)
/** @type {Map<string, number>} */
const fragments = new Map()
@@ -136,9 +135,7 @@ const relativeLinksRule = {
if (!fragmentsHTML.includes(url.hash)) {
if (url.hash.startsWith("#L")) {
const lineNumberFragmentString = getLineNumberStringFromFragment(
url.hash,
)
const lineNumberFragmentString = getLineNumberStringFromFragment(url.hash)
const hasOnlyDigits = isValidIntegerString(lineNumberFragmentString)
if (!hasOnlyDigits) {
@@ -153,10 +150,7 @@ const relativeLinksRule = {
continue
}
const lineNumberFragment = Number.parseInt(
lineNumberFragmentString,
10,
)
const lineNumberFragment = Number.parseInt(lineNumberFragmentString, 10)
const numberOfLines = getNumberOfLines(fileContent)
if (lineNumberFragment > numberOfLines) {
onError({