chore: lint using react-doctor, update translations, dynamic imports

This commit is contained in:
Amruth Pillai
2026-05-21 09:56:26 +02:00
parent 3596102c63
commit 39e88dd365
208 changed files with 5876 additions and 4778 deletions
@@ -29,12 +29,19 @@ const getTagName = (node: Node) => node.rawTagName.toLowerCase();
const hasBlockDescendant = (node: Node): boolean =>
node.childNodes.some((child) => child.nodeType === NodeType.ELEMENT_NODE && !isInlineNode(child));
const mergeClassNames = (...classNames: (string | undefined)[]): string =>
classNames
.flatMap((className) => className?.split(/\s+/) ?? [])
.filter(Boolean)
.filter((className, index, classNames) => classNames.indexOf(className) === index)
.join(" ");
const mergeClassNames = (...classNames: (string | undefined)[]): string => {
const uniqueClassNames = new Set<string>();
for (const className of classNames) {
if (!className) continue;
for (const part of className.split(/\s+/)) {
if (part) uniqueClassNames.add(part);
}
}
return [...uniqueClassNames].join(" ");
};
const normalizeMarkElements = (root: ReturnType<typeof parse>) => {
for (const mark of root.querySelectorAll("mark")) {