diff --git a/common/.eslintrc.js b/common/.eslintrc.js index 5212207a..7ab10930 100644 --- a/common/.eslintrc.js +++ b/common/.eslintrc.js @@ -26,7 +26,7 @@ module.exports = { caughtErrorsIgnorePattern: '^_', }, ], - 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-imports': 'warn', }, }, ], diff --git a/functions/.eslintrc.js b/functions/.eslintrc.js index 55070858..19960824 100644 --- a/functions/.eslintrc.js +++ b/functions/.eslintrc.js @@ -26,7 +26,7 @@ module.exports = { caughtErrorsIgnorePattern: '^_', }, ], - 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-imports': 'warn', }, }, ], diff --git a/web/.eslintrc.js b/web/.eslintrc.js index 56f12813..8cb4a83d 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -22,8 +22,9 @@ module.exports = { '@next/next/no-typos': 'off', 'linebreak-style': ['error', 'unix'], 'lodash/import-scope': [2, 'member'], - 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-imports': 'warn', }, + ignorePatterns: ['/public/mtg/*'], env: { browser: true, node: true, diff --git a/web/hooks/use-persistent-state.ts b/web/hooks/use-persistent-state.ts index ab1cd4a2..49819676 100644 --- a/web/hooks/use-persistent-state.ts +++ b/web/hooks/use-persistent-state.ts @@ -114,6 +114,7 @@ export const usePersistentState = ( if (key != null && store != null) { store.set(key, state) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [key, state]) if (store?.readsUrl) { @@ -127,6 +128,7 @@ export const usePersistentState = ( const savedValue = key != null ? store.get(key) : undefined setState(savedValue ?? initial) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [router.isReady]) } diff --git a/web/hooks/use-propz.ts b/web/hooks/use-propz.ts index ee2b9669..a12481c7 100644 --- a/web/hooks/use-propz.ts +++ b/web/hooks/use-propz.ts @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/rules-of-hooks */ import { isEmpty } from 'lodash' import { useRouter } from 'next/router' import { useState, useEffect } from 'react' @@ -12,7 +13,7 @@ type PropzProps = { // This allows us to client-side render the page for authenticated users. // TODO: Could cache the result using stale-while-revalidate: https://swr.vercel.app/ export function usePropz( - initialProps: Object, + initialProps: Record, getStaticPropz: (props: PropzProps) => Promise ) { // If props were successfully server-side generated, just use those @@ -29,6 +30,7 @@ export function usePropz( if (router.isReady) { getStaticPropz({ params }).then((result) => setPropz(result.props)) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [params]) return propz } diff --git a/web/tailwind.config.js b/web/tailwind.config.js index f9268d1d..a21a595c 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ const defaultTheme = require('tailwindcss/defaultTheme') const plugin = require('tailwindcss/plugin')