Skip to content

Conversation

Eric162
Copy link

@Eric162 Eric162 commented Jul 24, 2025

Added the explanation to the readme:

You can customize the ignore comment used by the plugin through the TS_STRICT_IGNORE_COMMENT
environment variable. This is particularly useful for teams migrating to strict mode who want
different behavior between their development environment and CI pipeline.

Example:

// @ts-strict-cli-ignore
const str: string | null = null;
const len = str.length; // error in IDE, passes cli with proper env var

in package.json scripts:

{
  "scripts": {
    "typecheck": "tsc && TS_STRICT_IGNORE_COMMENT=@ts-strict-ci-ignore tsc-strict"
  }
}
  • Files marked with e.g @ts-strict-cli-ignore will be ignored only by the CLI tool in CI
  • This allows gradual migration where developers see and fix issues locally without breaking the
    build

Have this running in my company repo through patch-package and it is working great!

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.

1 participant