From 992c245837ed0d4436c5756417cc07947c19c243 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 9 Dec 2021 15:23:21 -0800 Subject: [PATCH] Run prettier --- web/.eslintrc.js | 9 +++------ web/.prettierignore | 3 +++ web/hooks/use-contract.ts | 15 ++++++++------- web/hooks/use-user.ts | 12 ++++++------ 4 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 web/.prettierignore diff --git a/web/.eslintrc.js b/web/.eslintrc.js index 372eaa90..90ec1548 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -1,10 +1,7 @@ module.exports = { parser: '@typescript-eslint/parser', - extends: [ - 'plugin:react-hooks/recommended', - 'plugin:@next/next/recommended', - ], + extends: ['plugin:react-hooks/recommended', 'plugin:@next/next/recommended'], rules: { - // Add or disable rules here. - } + // Add or disable rules here. + }, } diff --git a/web/.prettierignore b/web/.prettierignore new file mode 100644 index 00000000..b79c5513 --- /dev/null +++ b/web/.prettierignore @@ -0,0 +1,3 @@ +# Ignore Next artifacts +.next/ +out/ \ No newline at end of file diff --git a/web/hooks/use-contract.ts b/web/hooks/use-contract.ts index 5ab723b4..c870a7fb 100644 --- a/web/hooks/use-contract.ts +++ b/web/hooks/use-contract.ts @@ -2,12 +2,13 @@ import { useEffect, useState } from 'react' import { Contract, listenForContract } from '../lib/firebase/contracts' export const useContract = (contractId: string) => { - const [contract, setContract] = useState('loading') + const [contract, setContract] = useState( + 'loading' + ) - useEffect(() => { - if (contractId) - return listenForContract(contractId, setContract) - }, [contractId]) + useEffect(() => { + if (contractId) return listenForContract(contractId, setContract) + }, [contractId]) - return contract -} \ No newline at end of file + return contract +} diff --git a/web/hooks/use-user.ts b/web/hooks/use-user.ts index b6085547..e462d2c6 100644 --- a/web/hooks/use-user.ts +++ b/web/hooks/use-user.ts @@ -2,11 +2,11 @@ import { useEffect, useState } from 'react' import { listenForLogin, User } from '../lib/firebase/users' export const useUser = () => { - const [user, setUser] = useState(null) + const [user, setUser] = useState(null) - useEffect(() => { - return listenForLogin(setUser) - }, []) + useEffect(() => { + return listenForLogin(setUser) + }, []) - return user -} \ No newline at end of file + return user +}