diff --git a/package.json b/package.json index 87e0197..5d36471 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dev": "node server.js", "prepublish": "pnpm build", "pub": "pnpm publish --no-git-checks --access public", - "format": "prettier --config prettier.json --write .", + "format": "prettier --config .prettierrc.js --write .", "lint": "eslint ./src/ --ext .ts", "lint:fix": "eslint ./src/ --ext .ts --fix" }, diff --git a/prettier.json b/prettier.json deleted file mode 100644 index f49da48..0000000 --- a/prettier.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "trailingComma": "es5", - "useTabs": true, - "semi": true, - "singleQuote": false -} diff --git a/src/client/dom/element.ts b/src/client/dom/element.ts index 5c70f62..84d77bd 100644 --- a/src/client/dom/element.ts +++ b/src/client/dom/element.ts @@ -52,7 +52,7 @@ export default function (client: ScramjetClient, self: typeof window) { for (const element of attrObject[attr]) { const descriptor = nativeGetOwnPropertyDescriptor( element.prototype, - attr, + attr ); Object.defineProperty(element.prototype, attr, { get() { @@ -80,7 +80,7 @@ export default function (client: ScramjetClient, self: typeof window) { base: new URL(client.url.origin), origin: new URL(client.url.origin), } as URLMeta, - true, + true ); } else if (["srcset", "imagesrcset"].includes(attr)) { value = rewriteSrcset(value, client.meta); @@ -183,8 +183,8 @@ export default function (client: ScramjetClient, self: typeof window) { return atob( client.natives["Element.prototype.getAttribute"].call( ctx.this, - "data-scramjet-script-source-src", - ), + "data-scramjet-script-source-src" + ) ); } if (ctx.this instanceof self.HTMLStyleElement) { @@ -274,7 +274,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - false, + false ); } }, @@ -286,7 +286,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - true, + true ); }, }); @@ -297,7 +297,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - false, + false ); }, });