diff --git a/src/api/eventApi.ts b/src/api/eventApi.ts index d2cb0e7..86fdaa4 100644 --- a/src/api/eventApi.ts +++ b/src/api/eventApi.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import axios from "axios"; import Event from "@models/Event"; import { getAuthHeader } from "@utils/auth"; diff --git a/src/api/feedApi.ts b/src/api/feedApi.ts index 6661c62..717d5c6 100644 --- a/src/api/feedApi.ts +++ b/src/api/feedApi.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import axios from "axios"; import Post from "@models/Feed"; import { getAuthHeader } from "@utils/auth"; diff --git a/src/api/jobAdApi.ts b/src/api/jobAdApi.ts index 2398906..c28c5a0 100644 --- a/src/api/jobAdApi.ts +++ b/src/api/jobAdApi.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import axios from "axios"; import JobAd from "@models/JobAd"; import { getAuthHeader } from "@utils/auth"; diff --git a/src/api/signupApi.ts b/src/api/signupApi.ts index dda6889..fa57f44 100644 --- a/src/api/signupApi.ts +++ b/src/api/signupApi.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import axios from "axios"; import { Signup, SignupForm } from "@models/Signup"; import { getAuthHeader } from "@utils/auth"; diff --git a/src/api/tagApi.ts b/src/api/tagApi.ts index 6a7e26c..8ec4f4c 100644 --- a/src/api/tagApi.ts +++ b/src/api/tagApi.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import axios from "axios"; import Tag from "@models/Tag"; diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index 13b972b..1efc431 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -12,7 +12,7 @@ export enum IconType { interface IconProps { name: IconType; link?: string; - onClick?: (event?: any) => void; + onClick?: React.MouseEventHandler; } const nameToIcon = (name: IconType): JSX.Element | string => { diff --git a/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx index f01bf59..098a5da 100644 --- a/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/OptionsWidget.tsx @@ -10,7 +10,7 @@ interface OptionsWidgetProps { } class OptionsWidget extends React.Component { - handleListOptionsChange = (questions: Question[], index: number) => (event) => { + handleListOptionsChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val = event.target.value; const lst = val.split(",").map((p) => p.trimLeft()); @@ -19,15 +19,15 @@ class OptionsWidget extends React.Component { onChange(questions); }; - handleTextOptionsChange = (questions: Question[], index: number) => (event) => { + handleTextOptionsChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val = event.target.value; // eslint-disable-next-line no-param-reassign - questions[index].options = val; + questions[index].options = val as unknown as string[]; // TODO: Check type onChange(questions); }; - handleIntegerOptionsChange = (questions: Question[], index: number) => (event) => { + handleIntegerOptionsChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val = event.target.value; if (val !== "") { @@ -43,7 +43,7 @@ class OptionsWidget extends React.Component { onChange(questions); }; - handleRequiredChange = (questions: Question[], index: number) => (event) => { + handleRequiredChange = (questions: Question[], index: number): React.ChangeEventHandler => (event) => { const { onChange } = this.props; const val: boolean = event.target.checked; console.log(val); diff --git a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx index 61e8164..2b3dbb2 100644 --- a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { ReactNode } from "react"; import styled from "styled-components"; import { Draggable } from "react-beautiful-dnd"; import { colors } from "@theme/colors"; @@ -17,8 +17,8 @@ const WidgetRow = styled.div` interface QuestionListProps { questions: Question[]; - innerRef: any; - placeholder: any; + innerRef: React.Ref; + placeholder: ReactNode; onChange: (value: Question[]) => void; } diff --git a/src/pages/admin/signups/[id]/list.tsx b/src/pages/admin/signups/[id]/list.tsx index 4ebe5a6..4af8344 100644 --- a/src/pages/admin/signups/[id]/list.tsx +++ b/src/pages/admin/signups/[id]/list.tsx @@ -9,8 +9,8 @@ import SignupApi from "@api/signupApi"; import { Button } from "@components/index"; import noop from "@utils/noop"; -const StyledButton = styled(Button) <{ colorOverride: "red" | "green" }>` - background-color: ${(p: any) => p.colorOverride}; +const StyledButton = styled(Button) <{ $colorOverride: "red" | "green" }>` + background-color: ${(p) => p.$colorOverride}; `; const SignupEmailPage: NextPage = () => { @@ -64,7 +64,7 @@ const SignupEmailPage: NextPage = () => { ))} q.title)} separator=";"> - + Download CSV @@ -81,7 +81,7 @@ const SignupEmailPage: NextPage = () => { ))} - confirmDelete(s, questions[0])}> + confirmDelete(s, questions[0])}> Delete diff --git a/tests/testcafe/utils.ts b/tests/testcafe/utils.ts index 140341b..7653030 100644 --- a/tests/testcafe/utils.ts +++ b/tests/testcafe/utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import { Selector, ClientFunction, RequestLogger } from "testcafe"; import axios from "axios";