From 35f8fa832450830155714d655e0572088fcf5717 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Yadav <79906609+sunilyadav840@users.noreply.github.com> Date: Sat, 22 May 2021 05:58:08 +0530 Subject: [PATCH] Add files to TS Strict (#803) Co-authored-by: Steve Faulkner --- .../NotebookRenderer/decorators/hijack-scroll/index.tsx | 7 +++---- .../NotebookRenderer/decorators/kbd-shortcuts/index.tsx | 7 +++---- tsconfig.strict.json | 8 +++++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx b/src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx index 99a6005d0..d45e79b01 100644 --- a/src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx +++ b/src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx @@ -1,12 +1,11 @@ /* 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"; import { Dispatch } from "redux"; -import { actions, selectors, ContentRef, AppState } from "@nteract/core"; - interface ComponentProps { id: string; contentRef: ContentRef; @@ -70,7 +69,7 @@ export class HijackScroll extends React.Component { } } -const makeMapStateToProps = (initialState: AppState, ownProps: ComponentProps) => { +const makeMapStateToProps = (_initialState: AppState, ownProps: ComponentProps) => { const mapStateToProps = (state: AppState) => { const { id, contentRef } = ownProps; const model = selectors.model(state, { contentRef }); @@ -87,7 +86,7 @@ const makeMapStateToProps = (initialState: AppState, ownProps: ComponentProps) = return mapStateToProps; }; -const makeMapDispatchToProps = (initialDispatch: Dispatch, ownProps: ComponentProps) => { +const makeMapDispatchToProps = (_initialDispatch: Dispatch, ownProps: ComponentProps) => { const mapDispatchToProps = (dispatch: Dispatch) => ({ selectCell: () => dispatch(actions.focusCell({ id: ownProps.id, contentRef: ownProps.contentRef })), }); diff --git a/src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx b/src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx index a3543dbd3..c92932395 100644 --- a/src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx +++ b/src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx @@ -1,11 +1,10 @@ +import { CellId } from "@nteract/commutable"; +import { actions, AppState, ContentRef, selectors } from "@nteract/core"; import Immutable from "immutable"; import React from "react"; import { connect } from "react-redux"; import { Dispatch } from "redux"; -import { CellId } from "@nteract/commutable"; -import { actions, AppState, ContentRef, selectors } from "@nteract/core"; - interface ComponentProps { contentRef: ContentRef; children: React.ReactNode; @@ -107,7 +106,7 @@ export class KeyboardShortcuts extends React.Component { } } -export const makeMapStateToProps = (state: AppState, ownProps: ComponentProps) => { +export const makeMapStateToProps = (_state: AppState, ownProps: ComponentProps) => { const { contentRef } = ownProps; const mapStateToProps = (state: AppState) => { const model = selectors.model(state, { contentRef }); diff --git a/tsconfig.strict.json b/tsconfig.strict.json index 3494c97a1..53cf90d99 100644 --- a/tsconfig.strict.json +++ b/tsconfig.strict.json @@ -8,7 +8,6 @@ "noUnusedParameters": true }, "files": [ - "src/Common/EntityValue.tsx", "./src/AuthType.ts", "./src/Bindings/ReactBindingHandler.ts", "./src/Common/ArrayHashMap.ts", @@ -123,7 +122,8 @@ "./src/i18n.ts", "./src/quickstart.ts", "./src/setupTests.ts", - "./src/userContext.test.ts" + "./src/userContext.test.ts", + "src/Common/EntityValue.tsx" ], "include": [ "src/CellOutputViewer/transforms/**/*", @@ -137,6 +137,8 @@ "src/Explorer/Controls/ResizeSensorReactComponent/**/*", "src/Explorer/Graph/GraphExplorerComponent/__mocks__/**/*", "src/Explorer/Notebook/NotebookComponent/__mocks__/**/*", + "src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/**/*", + "src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/**/*", "src/Explorer/Panes/RightPaneForm/**/*", "src/Libs/**/*", "src/Localization/**/*", @@ -146,4 +148,4 @@ "src/Terminal/**/*", "src/Utils/arm/**/*" ] -} \ No newline at end of file +}