Skip to content

Conversation

@DanielRosenwasser
Copy link
Member

Fixes #62333

Copilot AI review requested due to automatic review settings February 3, 2026 23:49
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Feb 3, 2026
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 3, 2026
Copy link
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 changes the default value of the --strict compiler option from false to true. This is a significant breaking change that enables all strict type-checking options by default.

Changes:

  • Modified the strict option default handling to return true when the option is undefined (instead of false)
  • Updated the command-line parser metadata to reflect the new default value of true
  • Regenerated test baselines to reflect the new stricter type checking behavior

Reviewed changes

Copilot reviewed 284 out of 13088 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/compiler/utilities.ts Modified getStrictOptionValue to default to true when strict is undefined
src/compiler/commandLineParser.ts Updated defaultValueDescription for strict option from false to true
tests/baselines/reference/*.js Added "use strict"; directive to generated JavaScript files
tests/baselines/reference/*.errors.txt Added new type-checking errors caught by stricter defaults (uninitialized properties, implicit any types, etc.)
tests/baselines/reference/*.types Updated type inference results to reflect stricter type checking

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Feb 4, 2026
@jakebailey jakebailey added the Breaking Change Would introduce errors in existing code label Feb 4, 2026
Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Pretty shocked there are no changes to any unit tests or related baselines; I verified locally too

@RyanCavanaugh RyanCavanaugh added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit 01c23d6 Feb 4, 2026
33 checks passed
@RyanCavanaugh RyanCavanaugh deleted the strictByDefault branch February 4, 2026 04:47
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team Breaking Change Would introduce errors in existing code For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enable --strict by default

4 participants