Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ================================================================
# Prismatica (opposite-osiris) — astro check on every pull request
# ================================================================
# The web image runs `astro build`, which strips types and never typechecks, so a
# missing import ships as a runtime ReferenceError (5333085: themeIcon). The check
# lives here, not in the Dockerfile: a type-only error blocks the merge, never a build.
# Runs in the Dockerfile's own base image so Node and pnpm match it exactly.
# ================================================================

name: Typecheck

on:
pull_request:

permissions:
contents: read

jobs:
astro-check:
name: 🔎 astro check
runs-on: ubuntu-latest
container: node:22-alpine
env:
TRACK_BINOCLE_IN_DOCKER: "1"
steps:
- uses: actions/checkout@v4

- name: Install
run: |
corepack enable && corepack prepare pnpm@11.5.1 --activate
pnpm install --frozen-lockfile --ignore-scripts --config.node-linker=hoisted

- name: astro check
run: node_modules/.bin/astro check
4 changes: 3 additions & 1 deletion src/lib/email-validation.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { validateEmail } from '../hooks/useAuth';

export type FieldValidationState = 'idle' | 'warning' | 'error' | 'success';

export type EmailValidationResult = {
valid: boolean;
state: 'idle' | 'warning' | 'error' | 'success';
state: FieldValidationState;
message: string;
};

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ function messageMentions(message: string, ...needles: string[]): boolean {



import { validateEmailFormat, type EmailValidationResult } from '../lib/email-validation';
import { validateEmailFormat, type EmailValidationResult, type FieldValidationState } from '../lib/email-validation';

function emailValidationResult(field: HTMLInputElement): EmailValidationResult {
return validateEmailFormat(field.value.trim(), field.required, field.validity.valid);
Expand Down
Loading