mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 10:51:30 +00:00
Compare commits
1 Commits
fix_eslint
...
eslint/fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ff5efcea4 |
@@ -18,7 +18,9 @@ src/Common/MessageHandler.test.ts
|
||||
src/Common/MessageHandler.ts
|
||||
src/Common/MongoProxyClient.test.ts
|
||||
src/Common/MongoUtility.ts
|
||||
src/Common/NotificationsClientBase.ts
|
||||
src/Common/QueriesClient.ts
|
||||
src/Common/Splitter.ts
|
||||
src/Controls/Heatmap/Heatmap.test.ts
|
||||
src/Controls/Heatmap/Heatmap.ts
|
||||
src/Definitions/datatables.d.ts
|
||||
@@ -35,7 +37,8 @@ src/Definitions/svg.d.ts
|
||||
src/Explorer/ComponentRegisterer.test.ts
|
||||
src/Explorer/ComponentRegisterer.ts
|
||||
src/Explorer/Controls/DiffEditor/DiffEditorComponent.ts
|
||||
src/Explorer/Controls/DynamicList/DynamicList.test.ts
|
||||
|
||||
src/Explorer/Controls/Editor/EditorComponent.ts
|
||||
src/Explorer/Controls/JsonEditor/JsonEditorComponent.ts
|
||||
src/Explorer/DataSamples/ContainerSampleGenerator.test.ts
|
||||
src/Explorer/DataSamples/ContainerSampleGenerator.ts
|
||||
@@ -103,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
|
||||
@@ -115,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
|
||||
@@ -149,11 +149,13 @@ src/Explorer/Graph/GraphExplorerComponent/NodePropertiesComponent.tsx
|
||||
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.test.tsx
|
||||
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.tsx
|
||||
src/Explorer/Menus/CommandBar/CommandBarUtil.tsx
|
||||
src/Explorer/Notebook/NotebookComponent/NotebookComponentAdapter.tsx
|
||||
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
|
||||
src/Explorer/Notebook/temp/inputs/connected-editors/codemirror.tsx
|
||||
src/Explorer/Tree/ResourceTreeAdapter.tsx
|
||||
|
||||
34351
package-lock.json
generated
34351
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -35,11 +35,8 @@ export class Splitter {
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
public initialize(): void {
|
||||
if (
|
||||
document.getElementById(this.splitterId) !== undefined &&
|
||||
document.getElementById(this.leftSideId) !== undefined
|
||||
) {
|
||||
public initialize() {
|
||||
if (document.getElementById(this.splitterId) !== null && document.getElementById(this.leftSideId) != null) {
|
||||
this.splitter = <HTMLElement>document.getElementById(this.splitterId);
|
||||
this.leftSide = <HTMLElement>document.getElementById(this.leftSideId);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import template from "./editor-component.html";
|
||||
/**
|
||||
* Helper class for ko component registration
|
||||
*/
|
||||
//eslint-disable-next-line
|
||||
export class EditorComponent {
|
||||
constructor() {
|
||||
return {
|
||||
@@ -39,7 +38,7 @@ class EditorViewModel extends JsonEditorViewModel {
|
||||
* setTimeout is needed as creating the edtior manipulates the dom directly and expects
|
||||
* Knockout to have completed all of the initial bindings for the component
|
||||
*/
|
||||
this.params.content() !== undefined &&
|
||||
this.params.content() != null &&
|
||||
setTimeout(() => {
|
||||
this.createEditor(this.params.content(), this.configureEditor.bind(this));
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface NotebookComponentAdapterOptions {
|
||||
|
||||
export class NotebookComponentAdapter extends NotebookComponentBootstrapper implements ReactAdapter {
|
||||
private onUpdateKernelInfo: () => void;
|
||||
public parameters: undefined;
|
||||
public parameters: any;
|
||||
|
||||
constructor(options: NotebookComponentAdapterOptions) {
|
||||
super({
|
||||
|
||||
@@ -46,9 +46,7 @@ const makeMapStateToProps = (
|
||||
const { contentRef } = initialProps;
|
||||
const mapStateToProps = (state: AppState) => {
|
||||
const content = selectors.content(state, { contentRef });
|
||||
let kernelStatus,
|
||||
kernelSpecName,
|
||||
currentCellType = "";
|
||||
let kernelStatus, kernelSpecName, currentCellType;
|
||||
|
||||
if (!content || content.type !== "notebook") {
|
||||
return {
|
||||
|
||||
@@ -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,5 +1,5 @@
|
||||
// /* eslint jsx-a11y/no-static-element-interactions: 0 */
|
||||
// /* eslint jsx-a11y/click-events-have-key-events: 0 */
|
||||
/* eslint jsx-a11y/no-static-element-interactions: 0 */
|
||||
/* eslint jsx-a11y/click-events-have-key-events: 0 */
|
||||
|
||||
import { actions, AppState, ContentRef, selectors } from "@nteract/core";
|
||||
import React from "react";
|
||||
@@ -23,7 +23,7 @@ interface DispatchProps {
|
||||
type Props = ComponentProps & DispatchProps & StateProps;
|
||||
|
||||
export class HijackScroll extends React.Component<Props> {
|
||||
el: HTMLDivElement | null | undefined = undefined;
|
||||
el: HTMLDivElement | null = null;
|
||||
|
||||
scrollIntoViewIfNeeded(prevFocused?: boolean): void {
|
||||
// Check if the element is being hovered over.
|
||||
@@ -38,7 +38,6 @@ export class HijackScroll extends React.Component<Props> {
|
||||
) {
|
||||
if (this.el && "scrollIntoViewIfNeeded" in this.el) {
|
||||
// This is only valid in Chrome, WebKit
|
||||
//eslint-disable-next-line
|
||||
(this.el as any).scrollIntoViewIfNeeded();
|
||||
} else if (this.el) {
|
||||
// Make a best guess effort for older platforms
|
||||
@@ -47,7 +46,7 @@ export class HijackScroll extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props): void {
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
this.scrollIntoViewIfNeeded(prevProps.focused);
|
||||
}
|
||||
|
||||
@@ -55,7 +54,7 @@ export class HijackScroll extends React.Component<Props> {
|
||||
this.scrollIntoViewIfNeeded();
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
render() {
|
||||
return (
|
||||
<div
|
||||
onClick={this.props.selectCell}
|
||||
|
||||
@@ -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__;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user