Skip to content

Commit 46b8e75

Browse files
authored
Clean up (#1263)
Clean up base on `astro check` warnings and errors, hardening ts config. Fix logo ![image](https://github.com/user-attachments/assets/6ee00dc6-abbe-44b2-90b9-731c2650aa8d)
1 parent d24d872 commit 46b8e75

File tree

7 files changed

+85
-32
lines changed

7 files changed

+85
-32
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@astrojs/mdx": "^4.2.6",
1717
"@astrojs/sitemap": "^3.3.1",
1818
"@astrojs/tailwind": "^5.1.5",
19+
"@astrojs/ts-plugin": "^1.10.4",
1920
"@fortawesome/fontawesome-free": "^6.7.2",
2021
"@tailwindcss/typography": "^0.5.16",
2122
"astro": "^5.7.5",

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/schedule/day.astro

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type ScheduleSession = {
5151
end: Date;
5252
endTime: string;
5353
duration: number;
54-
sessionType?: string;
54+
sessionType?: string | undefined;
5555
type: string;
5656
rooms: string[];
5757
};
@@ -331,9 +331,6 @@ const dateText = format(date, "eeee - do MMMM");
331331
);
332332

333333
const endStart = numberToTime(lastEndTime);
334-
const endStartDate = addMinutes(parseISO(dayName), lastEndTime);
335-
const endEndDate = addMinutes(endStartDate, 10);
336-
const endEnd = numberToTime(lastEndTime + 10);
337334

338335
---
339336

src/components/sections/keynoters/keynoter.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import Person5 from "./placeholders/person-5.astro";
1111
export interface Props {
1212
name: string;
1313
slug: string;
14-
tagline?: string;
14+
tagline?: string | undefined;
1515
image?: ImageMetadata;
16-
placeholder?: boolean;
17-
order?: number;
16+
placeholder?: boolean | undefined;
17+
order?: number | undefined;
1818
class?: string;
1919
}
2020

src/components/sections/speakers.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const sectionSubtitle = "Meet some of our amazing speakers";
7979

8080
let currentPosition = 0;
8181
const scrollSpeed = 4000;
82-
let slidingInterval: ReturnType<typeof setInterval> | null = null;
82+
let slidingInterval: number | null = null;
8383

8484
// Function to determine slides per view based on window width
8585
function getSlidesPerView() {
@@ -110,7 +110,7 @@ const sectionSubtitle = "Meet some of our amazing speakers";
110110
function startAnimation(slideWidth: number) {
111111
// Initial setup
112112
moveCarousel();
113-
slidingInterval = setInterval(moveCarousel, scrollSpeed);
113+
slidingInterval = window.setInterval(moveCarousel, scrollSpeed) as number;
114114

115115
function moveCarousel() {
116116
currentPosition += slideWidth;

src/content/sponsors/pycon-fi/pycon-fi.svg

Lines changed: 45 additions & 22 deletions
Loading

tsconfig.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
"compilerOptions": {
44
"strictNullChecks": true,
55
"noImplicitAny": false,
6+
"noFallthroughCasesInSwitch": true,
7+
"noImplicitOverride": true,
8+
"noImplicitReturns": true,
9+
"noUnusedLocals": true,
10+
"noUnusedParameters": true,
11+
// TODO: around 63 errors to clean up
12+
// "noUncheckedIndexedAccess": true,
13+
"exactOptionalPropertyTypes": true,
14+
"allowUnreachableCode": false,
15+
"allowUnusedLabels": false,
16+
617
"paths": {
718
"@utils/*": ["./src/utils/*"],
819
"@data/*": ["./src/data/*"],
@@ -15,5 +26,10 @@
1526
"@i18n/*": ["./src/i18n/*"],
1627
"@src/*": ["./src/*"]
1728
}
18-
}
29+
},
30+
"plugins": [
31+
{
32+
"name": "@astrojs/ts-plugin"
33+
}
34+
]
1935
}

0 commit comments

Comments
 (0)