Skip to content

Commit bca77a9

Browse files
committed
config(biome): experimental html full support
Signed-off-by: Adam Setch <[email protected]>
1 parent b670feb commit bca77a9

File tree

11 files changed

+106
-107
lines changed

11 files changed

+106
-107
lines changed

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
},
6363
"html": {
6464
"formatter": {
65-
"enabled": true
65+
"enabled": true,
66+
"indentScriptAndStyle": true
6667
},
6768
"experimentalFullSupportEnabled": true
6869
},

src/components/DownloadButton.astro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
import { Icon } from 'astro-icon/components';
2+
import { Icon } from 'astro-icon/components';
33
4-
export interface Props {
5-
item: {
6-
url: string;
7-
name: string;
8-
};
9-
}
4+
export interface Props {
5+
item: {
6+
url: string;
7+
name: string;
8+
};
9+
}
1010
11-
const { item } = Astro.props;
11+
const { item } = Astro.props;
1212
---
1313
<a
1414
href={item.url}

src/components/Footer.astro

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
2-
import { Icon } from "astro-icon/components";
3-
import { siteMetadata, URLs } from "~/constants";
2+
import { Icon } from 'astro-icon/components';
3+
import { siteMetadata, URLs } from '~/constants';
44
5-
const { currentPathname } = Astro.props;
6-
const isHomepage = currentPathname === "/";
5+
const { currentPathname } = Astro.props;
6+
const isHomepage = currentPathname === '/';
77
---
8-
98
<div
109
class:list={[
1110
"bg-gitify-footer text-white text-sm py-10 px-3",
@@ -16,17 +15,16 @@ const isHomepage = currentPathname === "/";
1615
<a
1716
target="_blank"
1817
rel="noopener noreferrer"
19-
href=`${URLs.GITHUB.REPO}`
18+
href={URLs.GITHUB.REPO}
2019
aria-label="GitHub Repository"
2120
class="mt-1 mb-4 mx-2 p-1 hover:motion-preset-pulse hover:motion-duration-1000"
2221
>
23-
<Icon name="mdi:github" size={32} />
22+
<Icon name="mdi:github" size={32}/>
2423
</a>
2524

2625
<div class="my-3">
27-
Copyright © <a href={siteMetadata.author.site}
28-
>{siteMetadata.author.name}</a
29-
>
26+
Copyright ©
27+
<a href={siteMetadata.author.site}>{siteMetadata.author.name}</a>
3028
{new Date().getFullYear()}
3129
</div>
3230
</div>

src/components/GitHubRepo.astro

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
---
2-
import { Icon } from 'astro-icon/components';
3-
import { Octokit } from 'octokit';
4-
import { siteMetadata, URLs } from '~/constants';
5-
import type { RepoStats } from '~/types';
2+
import { Icon } from 'astro-icon/components';
3+
import { Octokit } from 'octokit';
4+
import { siteMetadata, URLs } from '~/constants';
5+
import type { RepoStats } from '~/types';
66
7-
const octokit = new Octokit();
7+
const octokit = new Octokit();
88
9-
const formatCount = (count: number) => {
10-
return new Intl.NumberFormat('en', {
11-
notation: 'compact',
12-
maximumFractionDigits: 1,
13-
}).format(count);
14-
};
9+
const formatCount = (count: number) => {
10+
return new Intl.NumberFormat('en', {
11+
notation: 'compact',
12+
maximumFractionDigits: 1,
13+
}).format(count);
14+
};
1515
16-
const loadRepoStats = async (): Promise<RepoStats> => {
17-
try {
18-
const repository = await octokit.rest.repos.get({
19-
owner: siteMetadata.repo.owner,
20-
repo: siteMetadata.repo.name,
21-
});
16+
const loadRepoStats = async (): Promise<RepoStats> => {
17+
try {
18+
const repository = await octokit.rest.repos.get({
19+
owner: siteMetadata.repo.owner,
20+
repo: siteMetadata.repo.name,
21+
});
2222
23-
const latestRelease = await octokit.rest.repos.getLatestRelease({
24-
owner: siteMetadata.repo.owner,
25-
repo: siteMetadata.repo.name,
26-
});
23+
const latestRelease = await octokit.rest.repos.getLatestRelease({
24+
owner: siteMetadata.repo.owner,
25+
repo: siteMetadata.repo.name,
26+
});
2727
28-
return {
29-
forks: formatCount(repository.data.forks_count),
30-
stars: formatCount(repository.data.stargazers_count),
31-
latestReleaseName: latestRelease.data.name?.replace('v', '') ?? '',
32-
};
33-
} catch (error) {
34-
console.error('Failed to load repo stats', error);
35-
return {
36-
forks: '',
37-
stars: '',
38-
latestReleaseName: '',
39-
};
40-
}
41-
};
28+
return {
29+
forks: formatCount(repository.data.forks_count),
30+
stars: formatCount(repository.data.stargazers_count),
31+
latestReleaseName: latestRelease.data.name?.replace('v', '') ?? '',
32+
};
33+
} catch (error) {
34+
console.error('Failed to load repo stats', error);
35+
return {
36+
forks: '',
37+
stars: '',
38+
latestReleaseName: '',
39+
};
40+
}
41+
};
4242
43-
const { forks, stars, latestReleaseName } = await loadRepoStats();
43+
const { forks, stars, latestReleaseName } = await loadRepoStats();
4444
---
4545
<a
4646
href={URLs.GITHUB.REPO}

src/components/GoogleAnalytics.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
src="https://www.googletagmanager.com/gtag/js?id=G-QXML81DEDV"
55
></script>
66
<script>
7-
window.dataLayer = window.dataLayer || [];
8-
function gtag() {
9-
dataLayer.push(arguments);
10-
}
11-
gtag('js', new Date());
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag() {
9+
dataLayer.push(arguments);
10+
}
11+
gtag('js', new Date());
1212

13-
gtag('config', 'G-QXML81DEDV');
13+
gtag('config', 'G-QXML81DEDV');
1414
</script>

src/components/Hero.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
import { Image } from 'astro:assets';
3-
import notifications from '~/assets/notifications.png';
4-
import LatestRelease from '~/components/LatestRelease.astro';
5-
import Logo from '~/components/Logo.astro';
6-
import { siteMetadata } from '~/constants';
2+
import { Image } from 'astro:assets';
3+
import notifications from '~/assets/notifications.png';
4+
import LatestRelease from '~/components/LatestRelease.astro';
5+
import Logo from '~/components/Logo.astro';
6+
import { siteMetadata } from '~/constants';
77
---
88
<div class="bg-gitify-hero">
99
<div

src/components/Logo.astro

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
export interface Props {
3-
isDark?: boolean;
4-
className?: string;
5-
}
2+
export interface Props {
3+
isDark?: boolean;
4+
className?: string;
5+
}
66
7-
const LIGHT_GRADIENT_START = '#CCCCCC';
8-
const LIGHT_GRADIENT_END = '#FFFFFF';
7+
const LIGHT_GRADIENT_START = '#CCCCCC';
8+
const LIGHT_GRADIENT_END = '#FFFFFF';
99
10-
const DARK_GRADIENT_START = '#22283B';
11-
const DARK_GRADIENT_END = '#555B6E';
10+
const DARK_GRADIENT_START = '#22283B';
11+
const DARK_GRADIENT_END = '#555B6E';
1212
13-
const { isDark = false, className = '' } = Astro.props;
13+
const { isDark = false, className = '' } = Astro.props;
1414
---
1515
<svg
1616
class={className}

src/layouts/Layout.astro

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
import '~/styles/app.css';
2+
import '~/styles/app.css';
33
4-
import Footer from '~/components/Footer.astro';
5-
import GoogleAnalytics from '~/components/GoogleAnalytics.astro';
6-
import Navbar from '~/components/Navbar.astro';
7-
import { siteMetadata } from '~/constants';
4+
import Footer from '~/components/Footer.astro';
5+
import GoogleAnalytics from '~/components/GoogleAnalytics.astro';
6+
import Navbar from '~/components/Navbar.astro';
7+
import { siteMetadata } from '~/constants';
88
9-
export interface Props {
10-
title: string;
11-
}
9+
export interface Props {
10+
title: string;
11+
}
1212
13-
const { title } = Astro.props;
14-
const pageTitle = `${title} - ${siteMetadata.title}`;
15-
const ogImage = `${siteMetadata.url}/images/social.png`;
13+
const { title } = Astro.props;
14+
const pageTitle = `${title} - ${siteMetadata.title}`;
15+
const ogImage = `${siteMetadata.url}/images/social.png`;
1616
---
1717
<!doctype html>
1818
<html lang="en">

src/layouts/SectionRow.astro

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
import { Image } from 'astro:assets';
3-
import { marked } from 'marked';
2+
import { Image } from 'astro:assets';
3+
import { marked } from 'marked';
44
5-
export interface Props {
6-
title: string;
7-
description: string;
8-
screenshot?: {
9-
path: string;
10-
alt: string;
11-
};
12-
isDark?: boolean;
13-
isReversed?: boolean;
14-
}
5+
export interface Props {
6+
title: string;
7+
description: string;
8+
screenshot?: {
9+
path: string;
10+
alt: string;
11+
};
12+
isDark?: boolean;
13+
isReversed?: boolean;
14+
}
1515
16-
const {
17-
title,
18-
description,
19-
screenshot,
20-
isDark = false,
21-
isReversed = false,
22-
} = Astro.props;
16+
const {
17+
title,
18+
description,
19+
screenshot,
20+
isDark = false,
21+
isReversed = false,
22+
} = Astro.props;
2323
---
2424
<div
2525
class:list={[

src/pages/404.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import Layout from '~/layouts/Layout.astro';
2+
import Layout from '~/layouts/Layout.astro';
33
---
44
<Layout title="Page Not Found">
55
<div class="container max-w-4xl mx-auto px-12 flex-1">

0 commit comments

Comments
 (0)