Skip to content

Typecheck scripts, fix convertFourslash#3387

Open
jakebailey wants to merge 1 commit intomainfrom
jabaile/check-scripts-fix
Open

Typecheck scripts, fix convertFourslash#3387
jakebailey wants to merge 1 commit intomainfrom
jabaile/check-scripts-fix

Conversation

@jakebailey
Copy link
Copy Markdown
Member

We never checked this in CI, so we managed to commit errors.

Add CI checks, and then take my fix from #3304.

Copilot AI review requested due to automatic review settings April 11, 2026 05:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CI coverage to TypeScript-based repo scripts by introducing a dedicated type-check task, and fixes a TypeScript type-check failure in the fourslash conversion script (ported from #3304) so it can be reliably checked in CI.

Changes:

  • Fix convertFourslash.mts to throw (instead of returning undefined) on unsupported/invalid organizeImportsTypeOrder preference values, resolving a TS type-check issue.
  • Add a hereby task (check:scripts) that runs tsc -p across the repo’s script tsconfigs.
  • Update CI to run npm ci and execute npx hereby check:scripts in the misc job.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/fourslash/_scripts/convertFourslash.mts Makes preference parsing type-safe and consistent by throwing on invalid organizeImportsTypeOrder inputs.
Herebyfile.mjs Adds a check:scripts task to type-check script tsconfigs with tsc.
.github/workflows/ci.yml Ensures scripts are type-checked in CI by installing Node deps and running check:scripts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants