mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +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,42 +1,42 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import React from "react";
|
||||
import type { RendererContext } from 'vscode-notebook-renderer';
|
||||
|
||||
interface IRenderInfo {
|
||||
container: HTMLElement;
|
||||
mime: string;
|
||||
value: GitHubIssuesValue[];
|
||||
context: RendererContext<unknown>;
|
||||
}
|
||||
|
||||
interface GitHubIssuesValue {
|
||||
title: string;
|
||||
url: string;
|
||||
body: string;
|
||||
}
|
||||
|
||||
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>
|
||||
<td>{item.body}</td>
|
||||
</tr>;
|
||||
});
|
||||
|
||||
return <div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Issue</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
{issues}
|
||||
</table>
|
||||
</div>;
|
||||
};
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.addDisposeHandler(() => {
|
||||
// In development, this will be called before the renderer is reloaded. You
|
||||
// can use this to clean up or stash any state.
|
||||
});
|
||||
}
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import React from "react";
|
||||
import type { RendererContext } from 'vscode-notebook-renderer';
|
||||
|
||||
interface IRenderInfo {
|
||||
container: HTMLElement;
|
||||
mime: string;
|
||||
value: GitHubIssuesValue[];
|
||||
context: RendererContext<unknown>;
|
||||
}
|
||||
|
||||
interface GitHubIssuesValue {
|
||||
title: string;
|
||||
url: string;
|
||||
body: string;
|
||||
}
|
||||
|
||||
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>
|
||||
<td>{item.body}</td>
|
||||
</tr>;
|
||||
});
|
||||
|
||||
return <div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Issue</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
{issues}
|
||||
</table>
|
||||
</div>;
|
||||
};
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.addDisposeHandler(() => {
|
||||
// In development, this will be called before the renderer is reloaded. You
|
||||
// can use this to clean up or stash any state.
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user