Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
+6 -14
View File
@@ -148,7 +148,7 @@ export function parseFileProtocolUrl(value: string): InlinePathTarget | null {
export function parseAssistantFileLink(
value: string,
options: AssistantHrefParseOptions = {}
options: AssistantHrefParseOptions = {},
): InlinePathTarget | null {
const fileUrlTarget = parseFileProtocolUrl(value);
if (fileUrlTarget) {
@@ -217,7 +217,7 @@ export function parseAssistantFileLink(
export function normalizeInlinePathTarget(
rawPath: string,
cwd?: string
cwd?: string,
): NormalizedInlinePathTarget | null {
if (!rawPath) {
return null;
@@ -268,15 +268,11 @@ function isAllowedAbsolutePath(pathValue: string, workspaceRoot?: string): boole
const comparePath = normalizePathForCompare(pathValue);
const compareWorkspaceRoot = normalizePathForCompare(
normalizedWorkspaceRoot.replace(/\/+$/, "") || "/"
normalizedWorkspaceRoot.replace(/\/+$/, "") || "/",
);
const comparePrefix =
compareWorkspaceRoot === "/" ? "/" : `${compareWorkspaceRoot}/`;
const comparePrefix = compareWorkspaceRoot === "/" ? "/" : `${compareWorkspaceRoot}/`;
return (
comparePath === compareWorkspaceRoot ||
comparePath.startsWith(comparePrefix)
);
return comparePath === compareWorkspaceRoot || comparePath.startsWith(comparePrefix);
}
function normalizeFileUrlPath(pathname: string): string | null {
@@ -314,11 +310,7 @@ function normalizePathInput(value: string | undefined): string | null {
function resolvePathAgainstCwd(pathValue: string, cwd?: string): string | null {
const normalizedCwd = normalizePathInput(cwd);
if (
!normalizedCwd ||
!isAbsolutePath(pathValue) ||
!isAbsolutePath(normalizedCwd)
) {
if (!normalizedCwd || !isAbsolutePath(pathValue) || !isAbsolutePath(normalizedCwd)) {
return null;
}