From d00cd0e2d7534dbdaf2a3531c15bce84c1815086 Mon Sep 17 00:00:00 2001 From: Rui Saraiva Date: Thu, 4 Jun 2020 22:36:04 +0100 Subject: [PATCH] refactor(types): update types for new dependencies versions --- .eslintrc.json | 9 ++++++++- components/favycon-error/index.tsx | 8 ++++---- components/lazy-image/index.tsx | 6 +----- pages/api/favycon.ts | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4a62ec9..1e4448a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,7 +22,14 @@ "@typescript-eslint/explicit-member-accessibility": "off", "@typescript-eslint/member-delimiter-style": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-ignore": "off" + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-extra-semi": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-unsafe-member-access": "off" }, "overrides": [ { diff --git a/components/favycon-error/index.tsx b/components/favycon-error/index.tsx index 8bc6d26..c1dc9c1 100644 --- a/components/favycon-error/index.tsx +++ b/components/favycon-error/index.tsx @@ -17,12 +17,12 @@ const FavyconError = ({ error, clearError }: FavyconErrorProps) => { if (error) { let endTimeout: number setShowError(true) - const errorTimeout = setTimeout(() => { + const errorTimeout = window.setTimeout(() => { setShowError(false) - endTimeout = setTimeout(() => { + endTimeout = window.setTimeout(() => { clearError() - }, 300) as any - }, 5300) as any + }, 300) + }, 5300) return () => { clearTimeout(errorTimeout) clearTimeout(endTimeout) diff --git a/components/lazy-image/index.tsx b/components/lazy-image/index.tsx index e546510..56bb891 100644 --- a/components/lazy-image/index.tsx +++ b/components/lazy-image/index.tsx @@ -30,11 +30,7 @@ const LazyImage = ({ src, srcRetina = src, srcPlaceholder = src, alt, aspectRati {({ imageProps, imageState, ref }) => { const loaded = imageState === ImageState.LoadSuccess return ( -
+
{ break default: res.setHeader('Allow', ['POST']) - res.status(405).end(`Method ${req.method} Not Allowed`) + res.status(405).end(`Method ${req.method || ''} Not Allowed`) } }