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