From 36b0b16059c8d28eb5726e5c69c9e9052aefc4ef Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Fri, 14 Jan 2022 17:17:55 +0100 Subject: [PATCH] Lint --- .eslintrc.json | 2 +- components/ProjectModal.tsx | 14 +++++++------- pages/api/get_project.ts | 2 +- pages/index.tsx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 242520f..cfca33b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "extends": "next/core-web-vitals", "rules": { - "semi": ["warn", "always"], + "semi": ["warn", "always", { "omitLastInOneLineBlock": true }], "quotes": ["warn", "double"], "eqeqeq": "error" } diff --git a/components/ProjectModal.tsx b/components/ProjectModal.tsx index 02520ca..c27bfdc 100644 --- a/components/ProjectModal.tsx +++ b/components/ProjectModal.tsx @@ -34,30 +34,30 @@ const ProjectModal: NextPage = ({ project, visible, setVisible }) => } }); }); - } else if (project === "") setProjectData(projectEmpty) - }, [project]) + } else if (project === "") setProjectData(projectEmpty); + }, [project, projectEmpty, projectNotFoundHtml, projectServerErrorHtml]); useEffect(() => { if (projectData && containerRef.current && projectData !== "") { containerRef.current.innerHTML = projectData; } - }, [projectData, visible]) + }, [projectData, visible]); const onEscClose = (e: React.KeyboardEvent) => { if (e.key === "Escape") { e.preventDefault(); setVisible(false); } - } + }; - if (!visible) return <> + if (!visible) return <>; return
-
-} + ; +}; export default ProjectModal; \ No newline at end of file diff --git a/pages/api/get_project.ts b/pages/api/get_project.ts index 9f3e46a..0cef4ac 100644 --- a/pages/api/get_project.ts +++ b/pages/api/get_project.ts @@ -19,7 +19,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse { e.preventDefault(); setModalVisible(false); } - } + }; return (