Port TS#62611: add allowJs default value description#2727
Merged
jakebailey merged 3 commits intomainfrom Feb 10, 2026
Merged
Conversation
Change the allowJs compiler option's defaultValueDescription from false to the diagnostic message 'false, unless checkJs is set' to document the conditional default where checkJs implies allowJs. Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add allowJs default value description
Port TS#62611: add allowJs default value description
Feb 10, 2026
jakebailey
approved these changes
Feb 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports TypeScript#62611 to update the help text for the allowJs compiler option to accurately reflect its conditional default behavior. The allowJs option has defaulted to true when checkJs is set since TypeScript 4.1, but the help output incorrectly showed it as simply defaulting to false.
Changes:
- Updated
DefaultValueDescriptionforallowJsoption to use the diagnostic messageX_false_unless_checkJs_is_set - Accepted baseline updates for 8 help output test files to reflect the corrected default description
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tsoptions/declscompiler.go | Changed allowJs DefaultValueDescription from false to diagnostics.X_false_unless_checkJs_is_set |
| testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/help.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/help-all.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set-even-if-FORCE_COLOR-is-set.js | Updated baseline for help output showing new allowJs default description |
| testdata/baselines/reference/tsc/commandLine/adds-color-when-FORCE_COLOR-is-set.js | Updated baseline for help output showing new allowJs default description |
Member
|
@copilot you still have baselines out of date; rerun tests and accept |
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Contributor
Author
weswigham
approved these changes
Feb 10, 2026
Copilot AI
added a commit
that referenced
this pull request
Feb 25, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
allowJsdefaultValueDescription fromfalseto`false`, unless `checkJs` is setX_false_unless_checkJs_is_setalready exists in Go codebase (code 6932)allowJsoption indeclscompiler.goto use the diagnostic message✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.