From 839cc915af5ef1ac8dc7fb33c24a3c0269d880f5 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Thu, 26 Feb 2026 17:34:02 +0100 Subject: [PATCH] Format code --- docs/.vitepress/api/gh-icon/[...data].get.tsx | 9 ++++----- docs/.vitepress/api/gh-icon/diff/[...data].get.tsx | 8 ++++---- .../api/gh-icon/stroke-width/[...data].get.tsx | 8 ++++---- .../api/gh-icon/symmetry/[...data].get.tsx | 4 ++-- docs/.vitepress/lib/SvgPreview/index.tsx | 5 ++++- docs/scripts/writeVercelOutput.mjs | 12 ++++-------- docs/tsconfig.json | 4 +--- 7 files changed, 23 insertions(+), 27 deletions(-) diff --git a/docs/.vitepress/api/gh-icon/[...data].get.tsx b/docs/.vitepress/api/gh-icon/[...data].get.tsx index 20974223b..b74ce7dc3 100644 --- a/docs/.vitepress/api/gh-icon/[...data].get.tsx +++ b/docs/.vitepress/api/gh-icon/[...data].get.tsx @@ -34,7 +34,7 @@ export default eventHandler((event) => { const iconNode = iconNodes[backdropName]; const LucideIcon = createLucideIcon(backdropName, iconNode); - const svg = renderToStaticMarkup(); + const svg = renderToStaticMarkup(); const backdropString = svg.replaceAll('\n', '').replace(/]*>|<\/svg>/g, ''); children.push( @@ -42,7 +42,7 @@ export default eventHandler((event) => { backdropString={backdropString} src={src.replace(/]*>|<\/svg>/g, '')} color="#777" - /> + />, ); } @@ -52,12 +52,11 @@ export default eventHandler((event) => { return renderToString( ]*>|<\/svg>/g, '')} - showGrid height={height} width={width} > {children} - - ) + , + ); }); diff --git a/docs/.vitepress/api/gh-icon/diff/[...data].get.tsx b/docs/.vitepress/api/gh-icon/diff/[...data].get.tsx index 9e5934e34..34d15b684 100644 --- a/docs/.vitepress/api/gh-icon/diff/[...data].get.tsx +++ b/docs/.vitepress/api/gh-icon/diff/[...data].get.tsx @@ -26,10 +26,10 @@ export default eventHandler((event) => { const children = []; - const Icon = createLucideIcon(name, iconNodes[name]) + const Icon = createLucideIcon(name, iconNodes[name]); const oldSrc = iconNodes[name] - ? renderToStaticMarkup() + ? renderToStaticMarkup() .replaceAll('\n', '') .replace(/]*>|<\/svg>/g, '') : ''; @@ -46,6 +46,6 @@ export default eventHandler((event) => { width={width} > {children} - - ) + , + ); }); diff --git a/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.tsx b/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.tsx index cf702466c..fed9410aa 100644 --- a/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.tsx +++ b/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.tsx @@ -14,7 +14,7 @@ export default eventHandler((event) => { const src = Buffer.from(data, 'base64').toString('utf8'); const iconNode = parseSync(src.includes('${src}`).children.map( ({ name, attributes }) => [name, attributes], - ) as IconNode + ) as IconNode; defaultContentType(event, 'image/svg+xml'); setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000'); @@ -25,13 +25,13 @@ export default eventHandler((event) => { strokeWidth={strokeWidth} > - - ) + , + ); }); diff --git a/docs/.vitepress/api/gh-icon/symmetry/[...data].get.tsx b/docs/.vitepress/api/gh-icon/symmetry/[...data].get.tsx index fa27bf37e..08033bd4d 100644 --- a/docs/.vitepress/api/gh-icon/symmetry/[...data].get.tsx +++ b/docs/.vitepress/api/gh-icon/symmetry/[...data].get.tsx @@ -53,6 +53,6 @@ export default eventHandler((event) => { width={width} > {children} - - ) + , + ); }); diff --git a/docs/.vitepress/lib/SvgPreview/index.tsx b/docs/.vitepress/lib/SvgPreview/index.tsx index b0a855272..63abfa878 100644 --- a/docs/.vitepress/lib/SvgPreview/index.tsx +++ b/docs/.vitepress/lib/SvgPreview/index.tsx @@ -397,7 +397,10 @@ interface SvgPreviewProps extends React.SVGProps { children?: React.ReactNode; } -const SvgPreview = ({ src, children, height = 24, width = 24, showGrid = false, ...props }: SvgPreviewProps, ref) => { +const SvgPreview = ( + { src, children, height = 24, width = 24, showGrid = false, ...props }: SvgPreviewProps, + ref, +) => { const subGridSize = Math.max(height, width) % 3 === 0 ? Math.max(height, width) > 24 diff --git a/docs/scripts/writeVercelOutput.mjs b/docs/scripts/writeVercelOutput.mjs index 3796ea87a..3a55e2c4d 100644 --- a/docs/scripts/writeVercelOutput.mjs +++ b/docs/scripts/writeVercelOutput.mjs @@ -22,27 +22,23 @@ const iconAliasesRedirectRoutes = Object.entries(iconMetaData) }; }); - const vercelOutputJSON = path.resolve(currentDir, '.vercel/output/config.json'); const vercelConfig = await fs.promises.readFile(vercelOutputJSON, 'utf-8'); const vercelRouteConfig = JSON.parse(vercelConfig); -vercelRouteConfig.routes = [ - ...iconAliasesRedirectRoutes, - ...vercelRouteConfig.routes, -] +vercelRouteConfig.routes = [...iconAliasesRedirectRoutes, ...vercelRouteConfig.routes]; // Adjust the existing catch-all route to only catch API routes, so that we can add a new catch-all route for 404s const allCatchRoute = '/(.*)'; -const fallBackIndex = vercelRouteConfig.routes.findIndex(route => route.src === allCatchRoute); +const fallBackIndex = vercelRouteConfig.routes.findIndex((route) => route.src === allCatchRoute); -vercelRouteConfig.routes[fallBackIndex].src = '/api/(.*)' +vercelRouteConfig.routes[fallBackIndex].src = '/api/(.*)'; vercelRouteConfig.routes.push({ src: allCatchRoute, dest: '/404.html', -}) +}); const output = JSON.stringify(vercelRouteConfig, null, 2); diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 186a4ca35..f786c0c16 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -8,9 +8,7 @@ "allowSyntheticDefaultImports": true, "noEmit": true, "paths": { - "~/.vitepress/*": [ - "./.vitepress/*" - ], + "~/.vitepress/*": ["./.vitepress/*"], }, }, }