diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c163ebc..579ad87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,4 +47,4 @@ jobs: run: yarn run lint - name: Run prettier - run: yarn run prettier + run: yarn run prettier:check diff --git a/package.json b/package.json index 47b8ad8..bffb4b1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "next start", "lint": "next lint", "prettier": "npx prettier --config ./.prettierrc --write **/*.{ts,tsx}", + "prettier:check": "npx prettier --config ./.prettierrc --check **/*.{ts,tsx}", "test": "jest", "test:watch": "jest --watch" }, diff --git a/src/app/problems/[qid]/general-info/util.ts b/src/app/problems/[qid]/general-info/util.ts index eba2880..82502fd 100644 --- a/src/app/problems/[qid]/general-info/util.ts +++ b/src/app/problems/[qid]/general-info/util.ts @@ -1,14 +1,17 @@ import { Dispatch, MouseEvent, SetStateAction } from 'react'; -export const removeChip = (event: MouseEvent, setHook: Dispatch>) => { - if (event.currentTarget.tagName === 'PATH') { - console.info('Path'); - return; - } - - const contest = event.currentTarget.parentNode?.firstElementChild?.textContent; - if (!contest) { - return; - } - setHook((contests) => contests.filter((c) => c !== contest)); -}; \ No newline at end of file +export const removeChip = ( + event: MouseEvent, + setHook: Dispatch>, +) => { + if (event.currentTarget.tagName === 'PATH') { + console.info('Path'); + return; + } + + const contest = event.currentTarget.parentNode?.firstElementChild?.textContent; + if (!contest) { + return; + } + setHook((contests) => contests.filter((c) => c !== contest)); +};