Skip to content

Complete type safety across all JS/TS#105

Open
httphypixelnet wants to merge 16 commits into
frcsoftware:mainfrom
httphypixelnet:fix/type-safety
Open

Complete type safety across all JS/TS#105
httphypixelnet wants to merge 16 commits into
frcsoftware:mainfrom
httphypixelnet:fix/type-safety

Conversation

@httphypixelnet

Copy link
Copy Markdown
Contributor

This PR bring us one step closer to complete type safety. Before, we weren't checking JavaScript files (including inline scripts in our starlight override components) which is bad 👍. Also set tsconfig preset to strictest.

@github-actions

Copy link
Copy Markdown

🌐 Preview URL: https://pr-105.frcsoftware.pages.dev

@httphypixelnet
httphypixelnet requested a review from a team as a code owner July 22, 2026 22:05
@github-actions github-actions Bot added the infra Any infrastructure for building the website or syncing files label Jul 22, 2026
@roboteer5291
roboteer5291 requested a review from samfreund July 22, 2026 22:09
Comment thread src/starlightOverrides/Header.astro Outdated
httphypixelnet added a commit to httphypixelnet/frcsoftware.org that referenced this pull request Jul 22, 2026
@github-actions github-actions Bot added the Curriculum material Curriculum materials, lessons for students, etc label Jul 22, 2026
@httphypixelnet
httphypixelnet requested a review from samfreund July 22, 2026 23:46
@github-actions github-actions Bot removed the Curriculum material Curriculum materials, lessons for students, etc label Jul 23, 2026
Comment thread scripts/validate-regions.ts Outdated
const children = node.children;

// Look for images with hash attributes in URL
for (const child of children) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have multiple images, I think there's a bug here where the first image could mistakenly get assigned the attributes of the second (or last) image in the set. I'm not quite sure of the desired behavior, but if you have thoughts I'd like to hear them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see this issue? The loop looks clean, unless I'm missing something

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof sorry, I responded yesterday but GitHub ate my comment.

Anyways, MRE is a situation where you have two images in the same paragraph. First image has no attributes, but the second check doesn't get applied since there's two children (images). Second image has attributes which get applied via the parent node. The bug here is that those attributes get applied to the first image too, the one which didn't have any attributes specified.

@samfreund

Copy link
Copy Markdown
Member

otherwise lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Any infrastructure for building the website or syncing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants