Skip to content

Commit 4032531

Browse files
authored
Fix ci to check code format in ci (#34)
* Fix ci to check code format in ci * fix code format
1 parent 1899b13 commit 4032531

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ jobs:
4747
run: yarn run lint
4848

4949
- name: Run prettier
50-
run: yarn run prettier
50+
run: yarn run prettier:check

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"start": "next start",
1010
"lint": "next lint",
1111
"prettier": "npx prettier --config ./.prettierrc --write **/*.{ts,tsx}",
12+
"prettier:check": "npx prettier --config ./.prettierrc --check **/*.{ts,tsx}",
1213
"test": "jest",
1314
"test:watch": "jest --watch"
1415
},
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { Dispatch, MouseEvent, SetStateAction } from 'react';
22

3-
export const removeChip = (event: MouseEvent<HTMLElement, MouseEvent>, setHook: Dispatch<SetStateAction<string[]>>) => {
4-
if (event.currentTarget.tagName === 'PATH') {
5-
console.info('Path');
6-
return;
7-
}
8-
9-
const contest = event.currentTarget.parentNode?.firstElementChild?.textContent;
10-
if (!contest) {
11-
return;
12-
}
13-
setHook((contests) => contests.filter((c) => c !== contest));
14-
};
3+
export const removeChip = (
4+
event: MouseEvent<HTMLElement, MouseEvent>,
5+
setHook: Dispatch<SetStateAction<string[]>>,
6+
) => {
7+
if (event.currentTarget.tagName === 'PATH') {
8+
console.info('Path');
9+
return;
10+
}
11+
12+
const contest = event.currentTarget.parentNode?.firstElementChild?.textContent;
13+
if (!contest) {
14+
return;
15+
}
16+
setHook((contests) => contests.filter((c) => c !== contest));
17+
};

0 commit comments

Comments
 (0)