Skip to content

Commit b34bab4

Browse files
committed
pnpm run lint
1 parent 4c1b3b6 commit b34bab4

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@testing-library/jest-dom": "^6.5.0",
3333
"@testing-library/react": "^16.0.0",
3434
"@testing-library/user-event": "^14.5.2",
35-
"@types/chrome": "^0.0.248",
35+
"@types/chrome": "^0.0.293",
3636
"@types/node": "^20.8.7",
3737
"@types/react": "^18.2.15",
3838
"@types/react-dom": "^18.2.7",

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/controllers/WebRequest/kcsapi.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ export async function onMissionReturnInstruction([details]: chrome.webRequest.We
3030

3131
export async function onMissionResult([details]: chrome.webRequest.WebRequestBodyDetails[]) {
3232
const { api_deck_id: [api_deck_id] } = details.requestBody?.formData as unknown as { api_deck_id: string[], api_mission_id: string[] };
33-
const notifications = await (chrome.notifications as any).getAll() as Promise<Record<string, boolean>>;
34-
for (const id in notifications) {
35-
if (id.match(`/${EntryType.MISSION}/${api_deck_id}`)) chrome.notifications.clear(id);
36-
}
33+
// TODO: @types/chrome の chrome.notifications.getAll が Promise を返すようになったら修正
34+
await chrome.notifications.getAll((notifications) => {
35+
for (const id in notifications) {
36+
if (id.match(`/${EntryType.MISSION}/${api_deck_id}`)) chrome.notifications.clear(id);
37+
}
38+
});
3739
}
3840

3941
export async function onRecoveryStart([details]: chrome.webRequest.WebRequestBodyDetails[]) {

src/models/entry/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export enum EntryType {
1313
}
1414

1515
export const EntryColor = {
16-
[EntryType.MISSION]: "sky",
17-
[EntryType.RECOVERY]: "teal",
18-
[EntryType.SHIPBUILD]: "orange",
19-
[EntryType.FATIGUE]: "red",
20-
[EntryType.UNKNOWN]: "gray",
16+
[EntryType.MISSION]: "sky",
17+
[EntryType.RECOVERY]: "teal",
18+
[EntryType.SHIPBUILD]: "orange",
19+
[EntryType.FATIGUE]: "red",
20+
[EntryType.UNKNOWN]: "gray",
2121
}
2222

2323
export { Mission, Recovery, Shipbuild, Fatigue };

0 commit comments

Comments
 (0)