Change:
module: 'ESNext' as Proto.ModuleKind, moduleResolution: 'Node' as Proto.ModuleResolutionKind, target: 'ES2020' as Proto.ScriptTarget, <del> jsx: 'preserve' as Proto.JsxEmit, </del> <ins> jsx: 'react' as Proto.JsxEmit, </ins> }); export function inferredProjectCompilerOptions(

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: Code 1.68.0 OS Version: win10 Steps to Reproduce: Hi, If I enable in my like so: Then on save, VS Code will automatically remove the React import line from files like this TSX file, even though importing React is required for JSX/TSX files: export default App; For large JSX files, this is especially apparent because ESLint will output a plethora of "'React' must be in scope when using JSX" errors. ! Naturally, the only way to get the React import to stick is to reference something like or React.MouseEvent in my code, although this is not ideal. export default App; I believe this behavior to be the result of the 1.68.0 release, since I only started experiencing this issue a day or two ago, and the 1.68 release made some changes to organizeImports (per the release notes). I tried digging into the settings and reading online—it doesn't seem that the source.organizeImports setting is very configurable beyond specifying which language mode(s) it applies to. I have already searched open issues, disabled all my extensions, and tried the Insider build, to no avail in any case. Can someone please confirm if this is a 1.68 bug, and if there are any workarounds in the interim?
This looks like duplicate of And in this case depends on setting in /
This is happening in .js files as well. Just started since last update.

same as this thread which is locked I have "jsx": "react", in compilerOptions in tsconfig and jsconfig seems to be ignored
it looks like separate issue that should be reported separately. because I can't reproduce this part Are you sure that files that you see this behavior are handled included in configuration with proper setting? ! With this config I don't see problem with but removes import (as mentioned in ).
my Ok, this project has both js and ts config. The tsconfig from create-react-app had which seems to be at fault here. Once I updated to it works as expected.
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for . See also our . Happy Coding!
If it's recent version I think it was already configured to use new JSX emit that doesn't require explicit import and it can be safely removed. Import is needed for old react versions (<16.8) or if babel configured to emit old
Reopening to track changing VS Code's default setting for June
Same problem Adding in my project root directory can solve it