Skip to content

Commit

Permalink
chore: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmugliston committed Dec 3, 2024
1 parent 071a353 commit 0dbdf22
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"build": "tsc -b && vite build",
"build:watch": "tsc -b && vite build --watch",
"build:release": "./release.sh",
"lint": "eslint .",
"lint": "eslint ./src",
"preview": "vite preview"
},
"dependencies": {
Expand Down
18 changes: 16 additions & 2 deletions src/hooks/ApiToken.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
import {
afterAll,
beforeAll,
Expand Down Expand Up @@ -27,7 +28,20 @@ vi.mock("import.meta", () => ({
},
}));

let chrome = {} as { runtime: { id: string }; identity: any; storage: any };
interface IChrome {
runtime: { id: string };
identity: {
launchWebAuthFlow: (details: unknown, cb: (url: string) => void) => void;
};
storage: {
sync: {
get: Function;
set: Function;
};
};
}

let chrome = {} as IChrome;

describe("useApiToken", () => {
beforeAll(() => {
Expand All @@ -54,7 +68,7 @@ describe("useApiToken", () => {
});

afterAll(() => {
delete (global as any).chrome;
delete (global as { chrome?: IChrome }).chrome;
});

beforeEach(() => {
Expand Down

0 comments on commit 0dbdf22

Please sign in to comment.