Skip to content

Commit

Permalink
organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
gauntface committed Nov 2, 2024
1 parent 234cd92 commit 6dd8c46
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"plugins": ["prettier-plugin-svelte"],
"plugins": ["prettier-plugin-svelte", "prettier-plugin-organize-imports"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"globals": "^15.9.0",
"lodash-es": "^4.17.21",
"prettier": "^3.3.0",
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-svelte": "^3.2.3",
"semver": "^7.6.2",
"svelte": "^5.0.0",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/background/sw.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as browser from "webextension-polyfill";
import "../libs/monitoring/_sentry";
import { logger } from "../libs/utils/_logger";
import {
openPinnedTabs,
closePinnedTabs,
openPinnedTabs,
} from "../libs/controllers/_open-tabs";
import { getAutoOpenTabs } from "../libs/models/_auto-open-tabs-browser-storage";
import { getUrlsToPin } from "../libs/models/_pinned-tabs-browser-storage";
import "../libs/monitoring/_sentry";
import { logger } from "../libs/utils/_logger";
import { sleep } from "../libs/utils/_sleep";
import { getAutoOpenTabs } from "../libs/models/_auto-open-tabs-browser-storage";

const RETRY_SLEEP_MS = 100;
// After 5 minutes, give up.
Expand Down
2 changes: 1 addition & 1 deletion src/libs/controllers/_open-tabs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as browser from "webextension-polyfill";
import { logger } from "../utils/_logger";
import { getUrlsToPin } from "../models/_pinned-tabs-browser-storage";
import { logger } from "../utils/_logger";

/**
* @param {number} windowID
Expand Down
2 changes: 1 addition & 1 deletion src/libs/models/_auto-open-tabs-store.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import debounce, { type DebouncedFunc } from "lodash-es/debounce";
import {
type Readable,
type Subscriber,
type Unsubscriber,
} from "svelte/store";
import debounce, { type DebouncedFunc } from "lodash-es/debounce";
import {
getAutoOpenTabs,
setAutoOpenTabs,
Expand Down
4 changes: 2 additions & 2 deletions src/libs/models/_pinned-tabs-browser-storage.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeEach, afterEach, vi } from "vitest";
import { getUrlsToPin, setUrlsToPin } from "./_pinned-tabs-browser-storage";
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
import { storage } from "webextension-polyfill";
import { getUrlsToPin, setUrlsToPin } from "./_pinned-tabs-browser-storage";

vi.mock("webextension-polyfill", () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/models/_pinned-tabs-store.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import debounce, { type DebouncedFunc } from "lodash-es/debounce";
import {
type Readable,
type Subscriber,
type Unsubscriber,
} from "svelte/store";
import { getUrlsToPin, setUrlsToPin } from "./_pinned-tabs-browser-storage";
import debounce, { type DebouncedFunc } from "lodash-es/debounce";

export class PinnedTabsStore implements Readable<PinnedTabs> {
private _subscribers = new Set<Subscriber<PinnedTabs>>();
Expand Down
2 changes: 1 addition & 1 deletion src/libs/utils/_sleep.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test, beforeEach, afterEach, vi } from "vitest";
import { afterEach, beforeEach, expect, test, vi } from "vitest";
import { sleep } from "./_sleep";

beforeEach(() => {
Expand Down

0 comments on commit 6dd8c46

Please sign in to comment.