mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-25 12:44:06 +00:00
Fix ESLint for few files
This commit is contained in:
@@ -5,6 +5,7 @@ import template from "./editor-component.html";
|
||||
/**
|
||||
* Helper class for ko component registration
|
||||
*/
|
||||
//eslint-disable-next-line
|
||||
export class EditorComponent {
|
||||
constructor() {
|
||||
return {
|
||||
@@ -38,7 +39,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() != null &&
|
||||
this.params.content() !== undefined &&
|
||||
setTimeout(() => {
|
||||
this.createEditor(this.params.content(), this.configureEditor.bind(this));
|
||||
});
|
||||
|
||||
@@ -46,7 +46,9 @@ 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 {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/* 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";
|
||||
import { connect } from "react-redux";
|
||||
@@ -23,7 +20,7 @@ interface DispatchProps {
|
||||
type Props = ComponentProps & DispatchProps & StateProps;
|
||||
|
||||
export class HijackScroll extends React.Component<Props> {
|
||||
el: HTMLDivElement | null = null;
|
||||
el: HTMLDivElement | null | undefined = undefined;
|
||||
|
||||
scrollIntoViewIfNeeded(prevFocused?: boolean): void {
|
||||
// Check if the element is being hovered over.
|
||||
@@ -38,6 +35,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user