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

View File

@@ -23,10 +23,7 @@ export const convertHeadingToHTMLFragment = (inlineText) => {
// RegExp source with Ruby's \p{Word} expanded into its General Categories
// https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/toc_filter.rb
// https://ruby-doc.org/core-3.0.2/Regexp.html
.replace(
/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,
"",
)
.replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu, "")
.replace(/ /gu, "-"),
)
)
@@ -96,8 +93,7 @@ export const getMarkdownIdOrAnchorNameFragments = (content) => {
for (const token of tokens) {
const regexMatch =
idHTMLAttributeRegex.exec(token.content) ||
nameHTMLAttributeRegex.exec(token.content)
idHTMLAttributeRegex.exec(token.content) || nameHTMLAttributeRegex.exec(token.content)
if (regexMatch == null) {
continue
}