Skip to content

Add strict TypeScript type checking to build pipeline #9

Description

@dollfins

Description

The tsconfig.json has "strict": true but the build script (npm run compile) runs webpack directly without a separate type-check step. Webpack with ts-loader does not enforce strict type checking by default — it only transpiles. This means type errors can slip through.

Current State

// tsconfig.json has strict: true
// but compile runs: webpack --mode production
// which uses ts-loader without fork-ts-checker-webpack-plugin

Type errors that should be caught at build time are silently ignored.

Expected Behavior

Add a type-check step to the build process:

  1. Install fork-ts-checker-webpack-plugin for in-bundle type checking, OR
  2. Add a separate typecheck script: tsc --noEmit
  3. Run type checking in CI and before publishing

The vscode:prepublish script should include type checking:

"vscode:prepublish": "npm run typecheck && npm run compile && npm run lint"

Acceptance Criteria

  • npm run typecheck catches TypeScript strict mode errors
  • Build fails when type errors are present
  • CI workflow includes type-check step
  • All existing code passes strict type checking (or has explicit type annotations added as needed)

Complexity

Trivial — adding a script and a devDependency, minor type fixes.

Points

100

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions