chore: enable unicorn/better-dom-traversing, drop obsolete type stub

- Enable `unicorn/better-dom-traversing` and switch the flagged
  `.children[0]` / `.childNodes[0]` accesses to `.firstElementChild` /
  `.firstChild`.
- Remove the obsolete `eslint-plugin-no-use-extend-native` type stub; it is
  no longer a dependency.
- Drop misleading comments on `no-thenable` (enabled here, not disabled) and
  `try-complexity`.

Assisted-by: claude-code:opus-4.8
This commit is contained in:
silverwind committed 2026-06-09 12:14:13 +02:00
1 parent 76726bbfe4
commit c1e928ca96
4 files changed
+6 -12

No files matched your search

+2 -2
View File
@@ -86,8 +86,8 @@ function prepareProcessors(ctx:ProcessorContext): Processors {
function processElement(ctx :ProcessorContext, processors: Processors, el: HTMLElement): string | void {
if (el.hasAttribute('data-markdown-generated-content')) return el.textContent;
if (el.tagName === 'A' && el.children.length === 1 && el.children[0].tagName === 'IMG') {
return processElement(ctx, processors, el.children[0] as HTMLElement);
if (el.tagName === 'A' && el.children.length === 1 && el.firstElementChild!.tagName === 'IMG') {
return processElement(ctx, processors, el.firstElementChild as HTMLElement);
}
const isListContainer = el.tagName === 'OL' || el.tagName === 'UL';
+1 -1
View File
@@ -24,7 +24,7 @@ export function showGlobalErrorMessage(msg: string, msgType: Intent = 'error', d
if (!msgContainer) {
const el = document.createElement('div');
el.innerHTML = html`<div class="ui container js-global-error tw-my-[--page-spacing]"><details class="ui ${msgType} message"><summary></summary></details></div>`;
msgContainer = el.childNodes[0] as HTMLDivElement;
msgContainer = el.firstChild as HTMLDivElement;
}
// merge duplicated messages into "the message (count)" format