mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-21 11:47:14 +00:00
Fixed eslint issue of githuvClient and NotebookRenderer files
This commit is contained in:
parent
f968f57543
commit
2ff5efcea4
@ -106,7 +106,6 @@ src/Explorer/Tabs/ScriptTabBase.ts
|
||||
src/Explorer/Tabs/TabComponents.ts
|
||||
src/Explorer/Tabs/TabsBase.ts
|
||||
src/Explorer/Tabs/TriggerTab.ts
|
||||
src/Explorer/Tabs/UserDefinedFunctionTab.ts
|
||||
src/Explorer/Tree/AccessibleVerticalList.ts
|
||||
src/Explorer/Tree/Collection.ts
|
||||
src/Explorer/Tree/ConflictId.ts
|
||||
@ -118,14 +117,12 @@ src/Explorer/Tree/TreeComponents.ts
|
||||
src/Explorer/Tree/Trigger.ts
|
||||
src/Explorer/WaitsForTemplateViewModel.ts
|
||||
src/GitHub/GitHubClient.test.ts
|
||||
src/GitHub/GitHubClient.ts
|
||||
src/GitHub/GitHubConnector.ts
|
||||
src/GitHub/GitHubOAuthService.ts
|
||||
src/Index.ts
|
||||
src/Juno/JunoClient.test.ts
|
||||
src/Juno/JunoClient.ts
|
||||
src/Platform/Hosted/Authorization.ts
|
||||
src/ReactDevTools.ts
|
||||
src/Shared/Constants.ts
|
||||
src/Shared/DefaultExperienceUtility.test.ts
|
||||
src/Shared/DefaultExperienceUtility.ts
|
||||
@ -157,7 +154,6 @@ src/Explorer/Notebook/NotebookComponent/NotebookComponentBootstrapper.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/VirtualCommandBarComponent.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/contents/index.tsx
|
||||
src/Explorer/Notebook/NotebookRenderer/NotebookReadOnlyRenderer.tsx
|
||||
src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx
|
||||
src/Explorer/Notebook/NotebookRenderer/decorators/draggable/index.tsx
|
||||
src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx
|
||||
src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx
|
||||
|
@ -31,12 +31,13 @@ import StatusBar from "./StatusBar";
|
||||
import CellToolbar from "./Toolbar";
|
||||
|
||||
export interface NotebookRendererBaseProps {
|
||||
contentRef: any;
|
||||
contentRef: ContentRef;
|
||||
}
|
||||
|
||||
interface NotebookRendererDispatchProps {
|
||||
storeNotebookSnapshot: (imageSrc: string, requestId: string) => void;
|
||||
notebookSnapshotError: (error: string) => void;
|
||||
addTransform: (transform: React.ComponentType & { MIMETYPE: string }) => void;
|
||||
}
|
||||
|
||||
interface StateProps {
|
||||
@ -73,7 +74,7 @@ class BaseNotebookRenderer extends React.Component<NotebookRendererProps> {
|
||||
|
||||
componentDidMount() {
|
||||
if (!userContext.features.sandboxNotebookOutputs) {
|
||||
loadTransform(this.props as any);
|
||||
loadTransform(this.props as NotebookRendererProps);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +139,7 @@ class BaseNotebookRenderer extends React.Component<NotebookRendererProps> {
|
||||
}}
|
||||
</CodeCell>
|
||||
),
|
||||
markdown: ({ id, contentRef }: { id: any; contentRef: ContentRef }) =>
|
||||
markdown: ({ id, contentRef }: { id: CellId; contentRef: ContentRef }) =>
|
||||
decorate(
|
||||
id,
|
||||
contentRef,
|
||||
@ -155,7 +156,7 @@ class BaseNotebookRenderer extends React.Component<NotebookRendererProps> {
|
||||
</MarkdownCell>
|
||||
),
|
||||
|
||||
raw: ({ id, contentRef }: { id: any; contentRef: ContentRef }) =>
|
||||
raw: ({ id, contentRef }: { id: CellId; contentRef: ContentRef }) =>
|
||||
decorate(
|
||||
id,
|
||||
contentRef,
|
||||
@ -202,7 +203,8 @@ export const makeMapStateToProps = (
|
||||
return mapStateToProps;
|
||||
};
|
||||
|
||||
const makeMapDispatchToProps = (initialDispatch: Dispatch, initialProps: NotebookRendererBaseProps) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const makeMapDispatchToProps = (_initialDispatch: Dispatch, _initialProps: NotebookRendererBaseProps) => {
|
||||
const mapDispatchToProps = (dispatch: Dispatch) => {
|
||||
return {
|
||||
addTransform: (transform: React.ComponentType & { MIMETYPE: string }) =>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import { HttpStatusCodes } from "../Common/Constants";
|
||||
import { getErrorMessage } from "../Common/ErrorHandlingUtils";
|
||||
import * as Logger from "../Common/Logger";
|
||||
import * as UrlUtility from "../Common/UrlUtility";
|
||||
import { NotebookUtil } from "../Explorer/Notebook/NotebookUtil";
|
||||
import { getErrorMessage } from "../Common/ErrorHandlingUtils";
|
||||
|
||||
export interface IGitHubPageInfo {
|
||||
endCursor: string;
|
||||
@ -225,7 +225,7 @@ export class GitHubClient {
|
||||
private static readonly SelfErrorCode = 599;
|
||||
private ocktokit: Octokit;
|
||||
|
||||
constructor(private errorCallback: (error: any) => void) {
|
||||
constructor(private errorCallback: (error: Error) => void) {
|
||||
this.initOctokit();
|
||||
}
|
||||
|
||||
@ -501,10 +501,11 @@ export class GitHubClient {
|
||||
this.ocktokit = new Octokit({
|
||||
auth: token,
|
||||
log: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
debug: () => {},
|
||||
info: (message?: any) => GitHubClient.log(Logger.logInfo, message),
|
||||
warn: (message?: any) => GitHubClient.log(Logger.logWarning, message),
|
||||
error: (error?: any) => Logger.logError(getErrorMessage(error), "GitHubClient.Octokit"),
|
||||
info: (message?: string) => GitHubClient.log(Logger.logInfo, message),
|
||||
warn: (message?: string) => GitHubClient.log(Logger.logWarning, message),
|
||||
error: (error?: Error) => Logger.logError(getErrorMessage(error), "GitHubClient.Octokit"),
|
||||
},
|
||||
});
|
||||
|
||||
@ -514,7 +515,7 @@ export class GitHubClient {
|
||||
});
|
||||
}
|
||||
|
||||
private static log(logger: (message: string, area: string) => void, message?: any) {
|
||||
private static log(logger: (message: string, area: string) => void, message?: string) {
|
||||
if (message) {
|
||||
message = typeof message === "string" ? message : JSON.stringify(message);
|
||||
logger(message, "GitHubClient.Octokit");
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
if (window.parent !== window) {
|
||||
(window as any).__REACT_DEVTOOLS_GLOBAL_HOOK__ = (window.parent as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user