mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 16:48:03 +02:00
chore: fix violations from the newly-enabled unicorn rules
Apply the code changes required by the rules enabled in the previous commit: String() coercions over template literals, location.assign over href assignment, URL#href over toString, Object.entries/values loop forms, and related autofixes. Disable unicorn/no-non-function-verb-prefix, and disable unicorn/no-error-property-assignment for test files. Assisted-by: claude-code:opus-4.8
This commit is contained in:
41 files changed
+81
-103
No files matched your search
@@ -4,7 +4,7 @@ import {isDarkTheme} from '../utils.ts';
|
||||
|
||||
function safeRenderIframeLink(link: any): string | null {
|
||||
try {
|
||||
const url = new URL(`${link}`, window.location.href);
|
||||
const url = new URL(link, window.location.href);
|
||||
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
||||
console.error(`Unsupported link protocol: ${link}`);
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user