Skip to content

Commit

Permalink
chore(lint): Prettier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and stramel committed Nov 24, 2024
1 parent 5c171f8 commit 0ab4604
Show file tree
Hide file tree
Showing 3 changed files with 3,663 additions and 1,485 deletions.
12 changes: 6 additions & 6 deletions packages/core/src/utils/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface IconData {
}

const ICONIFY_REPO = new URL(
`https://raw.githubusercontent.com/iconify/icon-sets/master/json/`
`https://raw.githubusercontent.com/iconify/icon-sets/master/json/`,
);

function getIconifyUrl(collection: string) {
Expand All @@ -27,7 +27,7 @@ function getIconifyUrl(collection: string) {

async function fetchCollection(
collection: string,
{ cache }: { cache: FileCache }
{ cache }: { cache: FileCache },
): Promise<IconCollection> {
let collectionData = await cache.read<IconCollection>(collection);
if (collectionData) {
Expand All @@ -43,7 +43,7 @@ async function fetchCollection(

if (!collectionData) {
const err = new AstroIconError(
`Unable to locate the icon collection "${collection}"`
`Unable to locate the icon collection "${collection}"`,
);
if (import.meta.env.DEV) {
err.hint = `The "${collection}" icon collection does not exist.\n\nIs this a typo?`;
Expand All @@ -58,15 +58,15 @@ async function fetchCollection(
export async function getIconData(
collection: string,
name: string,
{ cache, logger }: { cache: FileCache; logger: AstroIntegrationLogger }
{ cache, logger }: { cache: FileCache; logger: AstroIntegrationLogger },
): Promise<IconData | undefined> {
const collectionData = await fetchCollection(collection, { cache });

const { icons, aliases } = collectionData;
const icon = icons[name] ?? aliases[name];
if (icon === undefined) {
const err = new AstroIconError(
`Unable to locate the icon "${collection}:${name}"`
`Unable to locate the icon "${collection}:${name}"`,
);
if (import.meta.env.DEV) {
err.hint = `The "${collection}" icon collection does not include an icon named "${name}".\n\nIs this a typo?`;
Expand All @@ -76,7 +76,7 @@ export async function getIconData(

if (icon.hidden) {
logger.warn(
`Deprecation Warning: The icon "${collection}:${name}" has been removed from the icon set.`
`Deprecation Warning: The icon "${collection}:${name}" has been removed from the icon set.`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/vite-plugin-astro-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function createPlugin({
return makeSvgComponent(
{ src: name, format: "svg", height, width },
svg,
experimental.svg
experimental.svg,
);
} catch (e) {
if (e instanceof AstroIconError) {
Expand Down
Loading

0 comments on commit 0ab4604

Please sign in to comment.