Make sure tsx files have same formatting as ts files

Also updates the react sample to only have a single tsconfig so tsfmt can be easily run on it
This commit is contained in:
Matt Bierner
2022-12-06 15:17:08 -08:00
parent 7ec56dd3cf
commit 7560f94b48
7 changed files with 93 additions and 110 deletions

View File

@ -1,3 +1,3 @@
[*.ts]
[*.{ts,tsx,js,jsx,json}]
indent_style = tab
tab_width = 4

View File

@ -2,9 +2,9 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './style.css';
import { IssuesList } from './render';
import errorOverlay from 'vscode-notebook-error-overlay';
import type { ActivationFunction } from 'vscode-notebook-renderer';
import { IssuesList } from './render';
// ----------------------------------------------------------------------------
// This is the entrypoint to the notebook renderer's webview client-side code.

View File

@ -15,7 +15,7 @@ interface GitHubIssuesValue {
body: string;
}
export const IssuesList: React.FC<{info: IRenderInfo}> = ({info}) => {
export const IssuesList: React.FC<{ info: IRenderInfo }> = ({ info }) => {
const issues = info.value.map(item => {
return <tr>
<td><a href={item.url}>{item.title}</a></td>

View File

@ -1,13 +0,0 @@
{
"extends": "../tsconfig-base.json",
"compilerOptions": {
"jsx": "react",
// noEmit prevents the default tsc from building this--we use webpack instead
"noEmit": true,
"rootDir": ".",
"module": "esnext",
"lib": ["ES2020", "dom"],
"types": ["webpack-env", "vscode-notebook-renderer"],
"allowSyntheticDefaultImports": true
}
}

View File

@ -1,17 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2019",
"lib": [
"ES2019"
],
"types": ["node"],
"moduleResolution": "node",
"sourceMap": true,
"strict": true /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
}
}

View File

@ -1,8 +1,21 @@
{
"files": [],
"references": [
{
"path": "./src/client"
}
"compilerOptions": {
"module": "esnext",
"target": "ES2020",
"moduleResolution": "node",
"sourceMap": true,
"strict": true,
"jsx": "react",
// noEmit prevents the default tsc from building this--we use webpack instead
"noEmit": true,
"rootDir": ".",
"types": [
"webpack-env",
"vscode-notebook-renderer"
],
"allowSyntheticDefaultImports": true
},
"include": [
"src/**/*"
]
}