mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 13:00:10 +02:00
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:
4 files changed
+6
-12
No files matched your search
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user