diff --git a/extension/bun.lock b/extension/bun.lock index 1472dff..c4ec7f9 100644 --- a/extension/bun.lock +++ b/extension/bun.lock @@ -34,7 +34,7 @@ "eslint-plugin-import-x": "^4.17.1", "eslint-plugin-jest": "^29.16.1", "eslint-plugin-react-hooks": "^7.1.1", - "eslint-plugin-unicorn": "72.0.0", + "eslint-plugin-unicorn": "73.0.0", "fake-indexeddb": "^6.2.5", "fast-check": "^4.9.0", "globals": "17.11.0", @@ -665,7 +665,7 @@ "eslint-plugin-react-hooks": ["eslint-plugin-react-hooks@7.1.1", "", { "dependencies": { "@babel/core": "^7.24.4", "@babel/parser": "^7.24.4", "hermes-parser": "^0.25.1", "zod": "^3.25.0 || ^4.0.0", "zod-validation-error": "^3.5.0 || ^4.0.0" }, "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" } }, "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g=="], - "eslint-plugin-unicorn": ["eslint-plugin-unicorn@72.0.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@eslint/css-tree": "^4.0.4", "browserslist": "^4.28.4", "change-case": "^5.4.4", "ci-info": "^4.4.0", "core-js-compat": "^3.49.0", "detect-indent": "^7.0.2", "entities": "^4.5.0", "find-up-simple": "^1.0.1", "globals": "^17.7.0", "indent-string": "^5.0.0", "is-builtin-module": "^5.0.0", "is-identifier": "^1.1.0", "pluralize": "^8.0.0", "quote-js-string": "^0.1.0", "regjsparser": "^0.13.2", "reserved-identifiers": "^1.2.0", "semver": "^7.8.5", "strip-indent": "^4.1.1", "yaml": "^2.9.0" }, "peerDependencies": { "eslint": ">=10.4" } }, "sha512-hqO6ksoOHO+ZhdseTuKRVQbx9U7PRO/cv8qAR1mctwzdVO2hYud8uS9luAhp43RJgziYgHAph8eHyipT8GL0ng=="], + "eslint-plugin-unicorn": ["eslint-plugin-unicorn@73.0.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@eslint/css-tree": "^4.0.4", "browserslist": "^4.28.4", "change-case": "^5.4.4", "ci-info": "^4.4.0", "core-js-compat": "^3.49.0", "detect-indent": "^7.0.2", "entities": "^4.5.0", "find-up-simple": "^1.0.1", "globals": "^17.7.0", "indent-string": "^5.0.0", "is-builtin-module": "^5.0.0", "is-identifier": "^1.1.0", "pluralize": "^8.0.0", "quote-js-string": "^0.1.0", "regjsparser": "^0.13.2", "reserved-identifiers": "^1.2.0", "semver": "^7.8.5", "strip-indent": "^4.1.1", "yaml": "^2.9.0" }, "peerDependencies": { "eslint": ">=10.4" } }, "sha512-V0YatLe9nkGhXEXKe2Qljb1EY0sJHwDV0HUF1NKFwtsHh/fU7qGHDgv+6fchzZcgU2/7noHo2gdjnmo0P2uDPw=="], "eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="], @@ -1387,8 +1387,6 @@ "eslint-plugin-jest/@typescript-eslint/utils": ["@typescript-eslint/utils@8.66.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.66.0", "@typescript-eslint/types": "8.66.0", "@typescript-eslint/typescript-estree": "8.66.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA=="], - "eslint-plugin-unicorn/globals": ["globals@17.7.0", "", {}, "sha512-Czmyns5dUsq4seFBR/Kdydhmo8y9kC79hiSkPn0YcGtNnYWnrgt0vjrSjx9tspoDGWm2CMarffRuLjM4xUz8xg=="], - "execa/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], diff --git a/extension/package.json b/extension/package.json index 6be2f7a..2bbcfea 100644 --- a/extension/package.json +++ b/extension/package.json @@ -73,7 +73,7 @@ "eslint-plugin-import-x": "^4.17.1", "eslint-plugin-jest": "^29.16.1", "eslint-plugin-react-hooks": "^7.1.1", - "eslint-plugin-unicorn": "72.0.0", + "eslint-plugin-unicorn": "73.0.0", "fake-indexeddb": "^6.2.5", "fast-check": "^4.9.0", "globals": "17.11.0", diff --git a/extension/src/lib/page-world-hook.ts b/extension/src/lib/page-world-hook.ts index 27effba..f00eb03 100644 --- a/extension/src/lib/page-world-hook.ts +++ b/extension/src/lib/page-world-hook.ts @@ -23,11 +23,17 @@ import { log } from "./log"; export interface PageWorldHookConfig { - /** chrome.scripting content-script id; doubles as the unregister key. */ + /** + * chrome.scripting content-script id; doubles as the unregister key. + */ readonly scriptId: string; - /** Bundled entrypoint filename registered as the MAIN-world script. */ + /** + * Bundled entrypoint filename registered as the MAIN-world script. + */ readonly scriptFile: string; - /** Short label used in this hook's log lines. */ + /** + * Short label used in this hook's log lines. + */ readonly logLabel: string; /** * Whether to inject into same-origin subframes (`allFrames`). Each @@ -36,7 +42,9 @@ export interface PageWorldHookConfig { * all-frames when each frame has its own prototype copy to patch. */ readonly allFrames: boolean; - /** Is the hook eligible to be registered right now? */ + /** + * Is the hook eligible to be registered right now? + */ readonly shouldRegister: () => Promise; /** * Storage change-sources that can flip `shouldRegister`'s result. Each is @@ -47,7 +55,9 @@ export interface PageWorldHookConfig { } export interface PageWorldHook { - /** Reconcile once at startup, then on every subscribed change. */ + /** + * Reconcile once at startup, then on every subscribed change. + */ start: () => void; }