Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Configure typescript to use react-jsx for jsx (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
defunctzombie committed Mar 11, 2021
1 parent f6e05b9 commit c398748
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ rules:
"@typescript-eslint/no-inferrable-types": off
"@typescript-eslint/no-empty-function": off
"@typescript-eslint/prefer-nullish-coalescing": warn
react/jsx-uses-react: off
react/react-in-jsx-scope: off
react/prop-types: warn
react-hooks/rules-of-hooks: error
Expand Down
6 changes: 6 additions & 0 deletions app/tsconfig.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"jsx": "react-jsxdev"
}
}
2 changes: 1 addition & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "react",
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"paths": {
"@foxglove-studio/app/*": ["*"]
Expand Down
1 change: 1 addition & 0 deletions webpack.renderer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export function makeConfig(_: unknown, argv: WebpackArgv): Configuration {
// https://github.com/TypeStrong/ts-loader#onlycompilebundledfiles
// avoid looking at files which are not part of the bundle
onlyCompileBundledFiles: true,
configFile: isDev ? "tsconfig.dev.json" : "tsconfig.json",
},
},
],
Expand Down

0 comments on commit c398748

Please sign in to comment.