From 0a1aa6d6ebdfa16b82f4a6aaf282089b1d484e05 Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Thu, 17 Apr 2025 20:02:55 +0200 Subject: [PATCH] Deemphasize old JSX transform (#61586) --- src/compiler/commandLineParser.ts | 2 +- .../parseCommandLine/Parse empty options of --jsx.js | 2 +- ...incorrect option of jsx to compiler-options with json api.js | 2 +- ...option of jsx to compiler-options with jsonSourceFile api.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8248a041946..c5f2931c19f 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -133,9 +133,9 @@ const compileOnSaveCommandLineOption: CommandLineOption = { const jsxOptionMap = new Map(Object.entries({ "preserve": JsxEmit.Preserve, "react-native": JsxEmit.ReactNative, - "react": JsxEmit.React, "react-jsx": JsxEmit.ReactJSX, "react-jsxdev": JsxEmit.ReactJSXDev, + "react": JsxEmit.React, })); /** @internal */ diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js index a4a41ae1260..1534c980364 100644 --- a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js @@ -7,4 +7,4 @@ FileNames:: 0.ts Errors:: error TS6044: Compiler option 'jsx' expects an argument. -error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'. +error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with json api.js index 78e37a98147..424e7d5bc57 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with json api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with json api.js @@ -27,5 +27,5 @@ CompilerOptions:: "configFilePath": "/apath/tsconfig.json" } Errors:: -error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'. +error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with jsonSourceFile api.js index 0c38a81d4e2..5d7a6002c1d 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with jsonSourceFile api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of jsx to compiler-options with jsonSourceFile api.js @@ -27,7 +27,7 @@ CompilerOptions:: "configFilePath": "/apath/tsconfig.json" } Errors:: -tsconfig.json:7:12 - error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'. +tsconfig.json:7:12 - error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react-jsx', 'react-jsxdev', 'react'. 7 "jsx": ""    ~~