TypeScript/tests/cases/fourslash/codeFixEnableJsxFlag_disabledInCompilerOptionsInTsConfig.ts
Hoang Pham 46b7972885 Add JSX codefix if available (#32281)
* Add JSX codefix if available

* Update react jsx.

* Update diagnostic code.
2019-08-16 12:46:55 -07:00

25 lines
455 B
TypeScript

/// <reference path='fourslash.ts' />
// @Filename: /dir/a.tsx
////export const Component = () => <></>
// @Filename: /dir/tsconfig.json
////{
//// "compilerOptions": {
//// "jsx": false,
//// }
////}
goTo.file("/dir/a.tsx");
verify.codeFix({
description: "Enable the '--jsx' flag in your configuration file",
newFileContent: {
"/dir/tsconfig.json":
`{
"compilerOptions": {
"jsx": "react",
}
}`,
},
});