refactor(types): update types for new dependencies versions

This commit is contained in:
Rui Saraiva 2020-06-04 22:36:04 +01:00
parent a8fd0ad8aa
commit d00cd0e2d7
4 changed files with 14 additions and 11 deletions

View File

@ -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": [
{

View File

@ -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)

View File

@ -30,11 +30,7 @@ const LazyImage = ({ src, srcRetina = src, srcPlaceholder = src, alt, aspectRati
{({ imageProps, imageState, ref }) => {
const loaded = imageState === ImageState.LoadSuccess
return (
<div
className={styles.root}
ref={ref}
style={{ paddingBottom: `${(height / width) * 100 + '%'}` }}
{...props}>
<div className={styles.root} ref={ref} style={{ paddingBottom: `${(height / width) * 100}%` }} {...props}>
<img
className={styles.placeholder}
src={srcPlaceholder}

View File

@ -104,6 +104,6 @@ export default async (req: MulterApiRequest, res: NextApiResponse) => {
break
default:
res.setHeader('Allow', ['POST'])
res.status(405).end(`Method ${req.method} Not Allowed`)
res.status(405).end(`Method ${req.method || ''} Not Allowed`)
}
}