Skip to content

Commit 2c1a624

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

File tree

15 files changed

+160
-103
lines changed

15 files changed

+160
-103
lines changed

biome.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@
3939
"indentStyle": "space",
4040
"indentWidth": 2
4141
},
42-
"overrides": [
43-
{
44-
"includes": ["**/*.astro"],
45-
"linter": {
46-
"rules": {
47-
"correctness": {
48-
"noUnusedImports": "off",
49-
"noUnusedVariables": "off"
50-
}
51-
}
52-
}
53-
}
54-
],
5542
"css": {
5643
"formatter": {
5744
"enabled": true
@@ -60,6 +47,12 @@
6047
"tailwindDirectives": true
6148
}
6249
},
50+
"html": {
51+
"formatter": {
52+
"enabled": true
53+
},
54+
"experimentalFullSupportEnabled": true
55+
},
6356
"javascript": {
6457
"formatter": {
6558
"quoteStyle": "single"

src/components/DownloadButton.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface Props {
1010
1111
const { item } = Astro.props;
1212
---
13-
1413
<a
1514
href={item.url}
1615
class:list={[
@@ -21,7 +20,7 @@ const { item } = Astro.props;
2120
]}
2221
>
2322
<div class="flex flex-row gap-2 items-center">
24-
<Icon name="line-md:cloud-alt-download-filled" size={24} />
23+
<Icon name="line-md:cloud-alt-download-filled" size={24}/>
2524
<span>{item.name}</span>
2625
</div>
2726
</a>

src/components/Footer.astro

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
2-
import { Icon } from 'astro-icon/components';
3-
import { siteMetadata, URLs } from '~/constants';
2+
3+
4+
5+
import { Icon } from "astro-icon/components";
6+
import { siteMetadata, URLs } from "~/constants";
47
58
const { currentPathname } = Astro.props;
6-
const isHomepage = currentPathname === '/';
9+
const isHomepage = currentPathname === "/";
710
---
811

912
<div

src/components/GitHubRepo.astro

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const loadRepoStats = async (): Promise<RepoStats> => {
4242
4343
const { forks, stars, latestReleaseName } = await loadRepoStats();
4444
---
45-
4645
<a
4746
href={URLs.GITHUB.REPO}
4847
target="_blank"
@@ -53,20 +52,20 @@ const { forks, stars, latestReleaseName } = await loadRepoStats();
5352
<section
5453
class="flex flex-row gap-2 items-center motion-preset-pop hover:motion-preset-oscillate hover:motion-duration-500"
5554
>
56-
<Icon name="mdi:github" size={32} class="w-6 sm:w-10" />
55+
<Icon name="mdi:github" size={32} class="w-6 sm:w-10"/>
5756
<div class="font-light max-sm:hidden">
5857
<div class="text-sm">{siteMetadata.repo.fullName}</div>
5958
<div class="flex flex-row gap-2 text-xs">
6059
<div class="flex flex-row gap-0.5 items-center">
61-
<Icon name="mdi:tag-outline" />
60+
<Icon name="mdi:tag-outline"/>
6261
{latestReleaseName}
6362
</div>
6463
<div class="flex flex-1 gap-0.5 items-center">
65-
<Icon name="mdi:star-outline" />
64+
<Icon name="mdi:star-outline"/>
6665
{stars}
6766
</div>
6867
<div class="flex flex-1 gap-0.5 items-center">
69-
<Icon name="mdi:source-branch" />
68+
<Icon name="mdi:source-branch"/>
7069
{forks}
7170
</div>
7271
</div>
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!-- Google tag (gtag.js) -->
2-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QXML81DEDV"
2+
<script
3+
async
4+
src="https://www.googletagmanager.com/gtag/js?id=G-QXML81DEDV"
35
></script>
46
<script>
5-
window.dataLayer = window.dataLayer || [];
6-
function gtag() {
7-
dataLayer.push(arguments);
8-
}
9-
gtag("js", new Date());
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag() {
9+
dataLayer.push(arguments);
10+
}
11+
gtag('js', new Date());
1012

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

src/components/Hero.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ import LatestRelease from '~/components/LatestRelease.astro';
55
import Logo from '~/components/Logo.astro';
66
import { siteMetadata } from '~/constants';
77
---
8-
98
<div class="bg-gitify-hero">
109
<div
1110
class="container flex flex-col md:flex-row lg:items-center max-w-5xl mx-auto px-12 py-8 lg:py-16"
1211
>
1312
<div class="flex flex-col justify-center grow">
14-
<Logo className="w-16 lg:w-24 mb-4" isDark />
13+
<Logo className="w-16 lg:w-24 mb-4" isDark/>
1514

1615
<h1 class="text-2xl lg:text-4xl font-semibold">{siteMetadata.title}</h1>
1716

1817
<h2 class="mt-2 text-xl lg:text-2xl font-light">
1918
{siteMetadata.description}.
2019
</h2>
2120

22-
<LatestRelease />
21+
<LatestRelease/>
2322
</div>
2423

2524
<div class="motion-preset-pop motion-rotate-in-[-30deg]">

src/components/LatestRelease.astro

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
11
---
2-
import { Icon } from 'astro-icon/components';
3-
import { format } from 'date-fns';
4-
import { Octokit } from 'octokit';
5-
import DownloadButton from '~/components/DownloadButton.astro';
6-
import { siteMetadata, URLs } from '~/constants';
2+
3+
4+
5+
6+
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
import { Icon } from "astro-icon/components";
34+
import { format } from "date-fns";
35+
import { Octokit } from "octokit";
36+
import DownloadButton from "~/components/DownloadButton.astro";
37+
import { siteMetadata, URLs } from "~/constants";
738
import type {
839
DownloadLink,
940
DownloadLinks,
1041
HeroData,
1142
ReleaseAsset,
12-
} from '~/types';
43+
} from "~/types";
1344
1445
const octokit = new Octokit();
1546
@@ -21,41 +52,41 @@ const getDownloadLinks = (assets: ReleaseAsset[]): DownloadLinks => {
2152
2253
const supportedOSs: DownloadLink[] = [
2354
{
24-
os: 'macOS',
25-
name: 'macOS (Universal)',
55+
os: "macOS",
56+
name: "macOS (Universal)",
2657
url: getAssetLink(/Gitify-\d+.\d+.\d+-universal.dmg/g),
2758
isPrimary: true,
2859
},
2960
{
30-
os: 'Windows',
31-
name: 'Windows',
61+
os: "Windows",
62+
name: "Windows",
3263
url: getAssetLink(/Gitify-Setup-\d+.\d+.\d+.exe/g),
3364
isPrimary: true,
3465
},
3566
{
36-
os: 'Linux',
37-
name: 'Linux (AppImage)',
67+
os: "Linux",
68+
name: "Linux (AppImage)",
3869
url: getAssetLink(/Gitify-\d+.\d+.\d+.AppImage/g),
3970
isPrimary: true,
4071
},
4172
{
42-
os: 'Linux',
43-
name: 'Linux (deb)',
73+
os: "Linux",
74+
name: "Linux (deb)",
4475
url: getAssetLink(/gitify_\d+.\d+.\d+_amd64.deb/g),
4576
},
4677
{
47-
os: 'Linux',
48-
name: 'Linux (rpm)',
78+
os: "Linux",
79+
name: "Linux (rpm)",
4980
url: getAssetLink(/gitify-\d+.\d+.\d+.x86_64.rpm/g),
5081
},
5182
];
5283
5384
const primaryDownloadLinks = supportedOSs.filter(
54-
({ isPrimary, url }) => url && isPrimary,
85+
({ isPrimary, url }) => url && isPrimary
5586
);
5687
5788
const altDownloadLinks = supportedOSs.filter(
58-
({ isPrimary, url }) => url && !isPrimary,
89+
({ isPrimary, url }) => url && !isPrimary
5990
);
6091
6192
return {
@@ -79,17 +110,17 @@ const loadInitialData = async (): Promise<HeroData> => {
79110
downloadLinks,
80111
version: latestRelease.data.name,
81112
releaseDate: latestRelease.data.published_at
82-
? format(latestRelease.data.published_at, 'dd/MM/yyyy')
83-
: '',
113+
? format(latestRelease.data.published_at, "dd/MM/yyyy")
114+
: "",
84115
};
85116
} catch (error) {
86117
return {
87118
downloadLinks: {
88119
alt: [],
89120
primary: [],
90121
},
91-
version: '',
92-
releaseDate: '',
122+
version: "",
123+
releaseDate: "",
93124
};
94125
}
95126
};

src/components/Logo.astro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const DARK_GRADIENT_END = '#555B6E';
1212
1313
const { isDark = false, className = '' } = Astro.props;
1414
---
15-
1615
<svg
1716
class={className}
1817
xmlns="http://www.w3.org/2000/svg"
@@ -30,17 +29,20 @@ const { isDark = false, className = '' } = Astro.props;
3029
>
3130
<stop
3231
stop-color={isDark ? DARK_GRADIENT_START : LIGHT_GRADIENT_START}
33-
offset="0%"></stop>
32+
offset="0%"
33+
></stop>
3434
<stop
3535
stop-color={isDark ? DARK_GRADIENT_END : LIGHT_GRADIENT_END}
36-
offset="100%"></stop>
36+
offset="100%"
37+
></stop>
3738
</linearGradient>
3839
</defs>
3940
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4041
<g
4142
id="Logo"
4243
transform="translate(6.000000, 6.000000)"
43-
fill={`url(${isDark ? '#linearGradient-dark' : '#linearGradient-light'})`}
44+
fill={`url(${isDark ? '#linearGradient-dark' : '#linearGradient-light'}
45+
)`}
4446
fill-rule="nonzero"
4547
>
4648
<path

src/components/Navbar.astro

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,41 @@
11
---
2-
import GitHubRepo from '~/components/GitHubRepo.astro';
3-
import Logo from '~/components/Logo.astro';
4-
import { siteMetadata } from '~/constants';
2+
3+
4+
5+
6+
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
import GitHubRepo from "~/components/GitHubRepo.astro";
34+
import Logo from "~/components/Logo.astro";
35+
import { siteMetadata } from "~/constants";
536
637
const { currentPathname } = Astro.props;
7-
const isHomepage = currentPathname === '/';
38+
const isHomepage = currentPathname === "/";
839
---
940

1041
<nav class:list={["py-10 px-8", isHomepage && "bg-gitify-hero"]}>

0 commit comments

Comments
 (0)