ci: add frontend typecheck gate

This commit is contained in:
Marco Allegretti 2026-02-06 19:31:06 +01:00
parent 33dfa8708e
commit be1c91feae
5 changed files with 906 additions and 9 deletions

View file

@ -35,6 +35,7 @@ steps:
- |
cd frontend
npm ci
npm run check
npm run build
services:

File diff suppressed because it is too large Load diff

View file

@ -6,11 +6,14 @@
"scripts": {
"dev": "astro dev",
"build": "astro build",
"check": "astro check --minimumSeverity error",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.6",
"@astrojs/node": "^9.0.0",
"astro": "^5.16.15",
"@astrojs/node": "^9.0.0"
"typescript": "^5.9.3"
}
}

View file

@ -14,15 +14,16 @@
<script>
import { getTheme, applyTheme, loadSavedTheme, saveTheme } from '../lib/themes';
const select = document.getElementById('theme-select');
const select = document.getElementById('theme-select') as HTMLSelectElement | null;
if (select) {
const currentTheme = loadSavedTheme();
select.value = currentTheme;
select.addEventListener('change', (e) => {
const target = e.target;
const themeId = target.value;
const target = e.currentTarget as HTMLSelectElement | null;
const themeId = target?.value;
if (!themeId) return;
const theme = getTheme(themeId);
applyTheme(theme);
saveTheme(themeId);

View file

@ -5,9 +5,9 @@
*/
interface Props {
method: 'approval' | 'ranked_choice' | 'schulze' | 'star' | 'quadratic';
compact?;
selected?;
interactive?;
compact?: boolean;
selected?: boolean;
interactive?: boolean;
}
const { method, compact = false, selected = false, interactive = false } = Astro.props;