fix: jsx is undefined by default, not preserve or react
#1102
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.
Description
one gets an error when using JSX without configuring
jsx:error TS17004: Cannot use JSX unless the '--jsx' flag is provided.TSConfig Reference said default was
react, which is inaccurateCompiler Options said default was
preserve, which is also inaccurateAdd a
undefinedas the default in TSConfig Reference, same asallowUnrechableCode
Remove the default in Compiler Options, same as all the other options
without defaults
History:
Reference:
preservewas written as the default in eae5cc3#diff-444415c73770eafd0f9db7d708d74131R5 / TSConfig Reference Overview #103 herereactin the body in eae5cc3#diff-444415c73770eafd0f9db7d708d74131R5 / Move over some of the new handbook TSConfig docs #119 herereactin 450ae96#diff-a912c6af3a16bf4288093c1264955bc6R120 / Improve the JSX docs #861 hereCompiler Options:
preservewas written as the default in 66f17ad#diff-bfc78b96c15b0ee906c1ab6176546dceR41Tags
Similar to #1101 , found while investigating discrepancies between the TSConfig Reference and Compiler Options after finding #1092
See historical references above as well
Review Notes
Can remove the
undefineddefault and just have nothing instead in the Reference. Wasn't sure if I should matchallowUnreachableCodeor if that were an exception sinceundefinedmeans something else there.