mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
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:
@ -1,3 +1,3 @@
|
||||
[*.ts]
|
||||
[*.{ts,tsx,js,jsx,json}]
|
||||
indent_style = tab
|
||||
tab_width = 4
|
||||
@ -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.
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
@ -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. */
|
||||
}
|
||||
}
|
||||
@ -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/**/*"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user