diff --git a/.changeset/seven-jobs-burn.md b/.changeset/seven-jobs-burn.md
new file mode 100644
index 0000000..912e699
--- /dev/null
+++ b/.changeset/seven-jobs-burn.md
@@ -0,0 +1,12 @@
+---
+"better-steam-rating": patch
+"ghproxy-gist-raw": patch
+"ghproxy-releases": patch
+"douban2rarbg": patch
+"ghproxy-raw": patch
+"exclude-dv": patch
+"template": patch
+"down-git": patch
+---
+
+Use [`biome`](https://biomejs.dev) instead of [`prettier`](https://prettier.io) to format the code.
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 192061c..736974f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -22,5 +22,5 @@ jobs:
node-version-file: package.json
cache: "pnpm"
- run: pnpm install -rw --frozen-lockfile
- - run: pnpm lint
- - run: pnpm cov
+ - run: pnpm biome ci --reporter=github
+ - run: pnpm run cov
diff --git a/.prettierignore b/.prettierignore
deleted file mode 100644
index 60555f0..0000000
--- a/.prettierignore
+++ /dev/null
@@ -1,2 +0,0 @@
-**/release/*
-**/pnpm-lock.yaml
diff --git a/biome.json b/biome.json
new file mode 100644
index 0000000..15cc9c4
--- /dev/null
+++ b/biome.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
+ "organizeImports": { "enabled": true },
+ "linter": {
+ "rules": { "recommended": true }
+ },
+ "formatter": {
+ "indentStyle": "space"
+ },
+ "files": { "ignoreUnknown": true },
+ "vcs": {
+ "enabled": true,
+ "clientKind": "git",
+ "useIgnoreFile": true
+ }
+}
diff --git a/package.json b/package.json
index 63b9e98..971ec9d 100644
--- a/package.json
+++ b/package.json
@@ -19,16 +19,16 @@
"test": "turbo run test",
"cov": "turbo run cov",
"pkg": "vite-node ./scripts/pack.ts",
- "lint": "turbo run lint",
- "fmt": "turbo run fmt",
+ "lint": "biome check",
+ "fmt": "biome check --write",
"changeset": "changeset"
},
"devDependencies": {
+ "@biomejs/biome": "1.8.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.8",
"@types/node": "^22.5.4",
"glob": "^11.0.0",
- "prettier": "^3.3.3",
"turbo": "^2.1.1",
"typescript": "^5.5.4",
"vite-node": "^2.0.5"
diff --git a/packages/_template/package.json b/packages/_template/package.json
index db29195..3b08429 100644
--- a/packages/_template/package.json
+++ b/packages/_template/package.json
@@ -18,15 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey"
- ],
+ "keywords": ["userscript", "tampermonkey"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/_template/src/main.ts b/packages/_template/src/main.ts
index d146ef6..ae69443 100644
--- a/packages/_template/src/main.ts
+++ b/packages/_template/src/main.ts
@@ -1,3 +1,3 @@
console.log("Hello World");
-export {};
+export type {};
diff --git a/packages/_template/vite.config.ts b/packages/_template/vite.config.ts
index 6441eb1..cb4510b 100644
--- a/packages/_template/vite.config.ts
+++ b/packages/_template/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/better-steam-rating/package.json b/packages/better-steam-rating/package.json
index ef96ec6..e6db350 100644
--- a/packages/better-steam-rating/package.json
+++ b/packages/better-steam-rating/package.json
@@ -18,16 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "steam"
- ],
+ "keywords": ["userscript", "tampermonkey", "steam"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@types/node": "^22.5.4",
diff --git a/packages/better-steam-rating/src/main.js b/packages/better-steam-rating/src/main.js
index aaebf3c..e49f803 100644
--- a/packages/better-steam-rating/src/main.js
+++ b/packages/better-steam-rating/src/main.js
@@ -13,9 +13,10 @@ function hideEle(item) {
function checkFn() {
const minRealNum = 100;
- const items = document.querySelectorAll(".responsive_search_name_combined");
- items.forEach((item2) => {
+ for (const item2 of document.querySelectorAll(
+ ".responsive_search_name_combined",
+ )) {
if (item2.dataset.isCheck) return;
let days = 0;
@@ -36,7 +37,7 @@ function checkFn() {
gameDate.setDate(dateArr[2]);
days = (new Date().getTime() - gameDate.getTime()) / 86400000;
- days = parseInt(days);
+ days = Number.parseInt(days);
}
}
@@ -63,9 +64,9 @@ function checkFn() {
const num = lastArr[0].replace(/\,/g, "");
const rate = lastArr[2].replace("%", "");
- const realNum = parseInt((num * rate) / 100);
+ const realNum = Number.parseInt((num * rate) / 100);
- if (isNaN(realNum)) {
+ if (Number.isNaN(realNum)) {
console.log(content);
return;
}
@@ -77,7 +78,7 @@ function checkFn() {
realRate = realRate > 10 ? realRate.toFixed(0) : realRate.toFixed(1);
}
- const innerHtml = `${rate}${parseInt(
+ const innerHtml = `${rate}${Number.parseInt(
(num * rate) / 100,
)}${days}${realRate}`;
@@ -93,7 +94,7 @@ function checkFn() {
if (realNum && realNum < minRealNum && realRate !== "-" && realRate < 0.1) {
hideEle(item);
}
- });
+ }
}
setInterval(() => {
diff --git a/packages/better-steam-rating/vite.config.js b/packages/better-steam-rating/vite.config.js
index ef9aeae..96675ed 100644
--- a/packages/better-steam-rating/vite.config.js
+++ b/packages/better-steam-rating/vite.config.js
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/douban2rarbg/package.json b/packages/douban2rarbg/package.json
index 5a5dd3b..f8fa50b 100644
--- a/packages/douban2rarbg/package.json
+++ b/packages/douban2rarbg/package.json
@@ -18,19 +18,12 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "douban",
- "rarbg"
- ],
+ "keywords": ["userscript", "tampermonkey", "douban", "rarbg"],
"license": "MIT",
"scripts": {
"build": "vite build",
"test": "vitest run",
- "cov": "vitest run --coverage",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "cov": "vitest run --coverage"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/douban2rarbg/src/main.ts b/packages/douban2rarbg/src/main.ts
index 6581ae9..372696f 100644
--- a/packages/douban2rarbg/src/main.ts
+++ b/packages/douban2rarbg/src/main.ts
@@ -16,14 +16,14 @@ const META_DATA = {
},
};
-(function () {
+(() => {
const metaRoot = document.querySelector("#info");
const imdb = metaRoot?.textContent?.match(/tt[0-9]{4,}/)?.[0];
const doubanID = document.location.toString().split("/")[4];
if (!imdb || !doubanID) return;
- Object.entries(META_DATA).forEach(([key, sites]) => {
+ for (const [key, sites] of Object.entries(META_DATA)) {
const metaNode = document.createElement("span");
const plNode = document.createElement("span");
const attrsNode = document.createElement("span");
@@ -61,7 +61,7 @@ const META_DATA = {
metaRoot.appendChild(metaNode);
metaRoot.appendChild(br);
- });
+ }
})();
-export {};
+export type {};
diff --git a/packages/douban2rarbg/test/main.test.ts b/packages/douban2rarbg/test/main.test.ts
index 2eda40a..ec7936d 100644
--- a/packages/douban2rarbg/test/main.test.ts
+++ b/packages/douban2rarbg/test/main.test.ts
@@ -1,5 +1,5 @@
-import { describe, it, expect } from "vitest";
import { JSDOM } from "jsdom";
+import { describe, expect, it } from "vitest";
describe("douban2rarbg", () => {
it("should work", async () => {
diff --git a/packages/douban2rarbg/vite.config.ts b/packages/douban2rarbg/vite.config.ts
index 720c298..bdcd12d 100644
--- a/packages/douban2rarbg/vite.config.ts
+++ b/packages/douban2rarbg/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/down-git/package.json b/packages/down-git/package.json
index a4ca550..5ee04fd 100644
--- a/packages/down-git/package.json
+++ b/packages/down-git/package.json
@@ -18,16 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "github"
- ],
+ "keywords": ["userscript", "tampermonkey", "github"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/down-git/src/main.ts b/packages/down-git/src/main.ts
index 3523e0f..094ee50 100644
--- a/packages/down-git/src/main.ts
+++ b/packages/down-git/src/main.ts
@@ -18,11 +18,11 @@ function downloader(localUrl: string) {
if (flag === "tree") {
return `${DOWN_GIT}/#/home?url=${localUrl}`;
- } else if (flag === "blob") {
+ }
+ if (flag === "blob") {
return `${JSDELIVR}/gh/${user}/${repo}@${branch}/${rest.join("/")}`;
- } else {
- return localUrl;
}
+ return localUrl;
}
function setButton(urlNode: HTMLAnchorElement) {
@@ -40,14 +40,14 @@ function setButton(urlNode: HTMLAnchorElement) {
}
requestIdleCallback(() => {
- document.querySelectorAll("div.Box-row").forEach((node) => {
+ for (const node of document.querySelectorAll("div.Box-row")) {
const urlNode = node.querySelector("a");
const anchorNode = node.querySelector("div.text-right");
if (!urlNode || urlNode.querySelector("span")) return;
node.insertBefore(setButton(urlNode), anchorNode);
- });
+ }
});
-export {};
+export type {};
diff --git a/packages/down-git/vite.config.ts b/packages/down-git/vite.config.ts
index 727ddcf..02a4759 100644
--- a/packages/down-git/vite.config.ts
+++ b/packages/down-git/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/exclude-dv/package.json b/packages/exclude-dv/package.json
index 370f840..4ec0af6 100644
--- a/packages/exclude-dv/package.json
+++ b/packages/exclude-dv/package.json
@@ -18,16 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "rarbg"
- ],
+ "keywords": ["userscript", "tampermonkey", "rarbg"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/exclude-dv/src/main.ts b/packages/exclude-dv/src/main.ts
index 0451d32..29e173c 100644
--- a/packages/exclude-dv/src/main.ts
+++ b/packages/exclude-dv/src/main.ts
@@ -1,12 +1,12 @@
const DV_TRAIT = /(\w+[\.\-\ \[\]])+DV[\.\-\ \[\]](\w+[\.\-\ \[\]]?)+/;
-document.querySelectorAll("table.lista2t tr.lista2").forEach((tr) => {
+for (const tr of document.querySelectorAll("table.lista2t tr.lista2")) {
const link = tr.querySelector("td:nth-child(2) > a");
if (DV_TRAIT.test(link?.innerHTML || "")) {
console.log("[Exclude DV] Remove: ", link?.title);
tr.remove();
}
-});
+}
-export {};
+export type {};
diff --git a/packages/exclude-dv/vite.config.ts b/packages/exclude-dv/vite.config.ts
index 89ad99e..c3eee5a 100644
--- a/packages/exclude-dv/vite.config.ts
+++ b/packages/exclude-dv/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/ghproxy-gist-raw/package.json b/packages/ghproxy-gist-raw/package.json
index 99cb782..a678d4a 100644
--- a/packages/ghproxy-gist-raw/package.json
+++ b/packages/ghproxy-gist-raw/package.json
@@ -18,17 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "github",
- "gist"
- ],
+ "keywords": ["userscript", "tampermonkey", "github", "gist"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/ghproxy-gist-raw/src/main.ts b/packages/ghproxy-gist-raw/src/main.ts
index bb999e6..6ef3f84 100644
--- a/packages/ghproxy-gist-raw/src/main.ts
+++ b/packages/ghproxy-gist-raw/src/main.ts
@@ -1,13 +1,11 @@
const PROXY_URL = "https://ghproxy.com/";
function agentGistRaw(proxy: string) {
- const links = document.querySelectorAll(
+ for (const link of document.querySelectorAll(
".file-actions a, .ml-2:nth-last-child(1) a",
- );
-
- links.forEach((link) => {
+ )) {
link.href = proxy + link.href;
- });
+ }
}
agentGistRaw(PROXY_URL);
@@ -16,4 +14,4 @@ document.addEventListener("pjax:success", () => {
agentGistRaw(PROXY_URL);
});
-export {};
+export type {};
diff --git a/packages/ghproxy-gist-raw/vite.config.ts b/packages/ghproxy-gist-raw/vite.config.ts
index ee10d7b..84e1fb4 100644
--- a/packages/ghproxy-gist-raw/vite.config.ts
+++ b/packages/ghproxy-gist-raw/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/ghproxy-raw/package.json b/packages/ghproxy-raw/package.json
index 7f3daa2..267355b 100644
--- a/packages/ghproxy-raw/package.json
+++ b/packages/ghproxy-raw/package.json
@@ -18,16 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "github"
- ],
+ "keywords": ["userscript", "tampermonkey", "github"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/ghproxy-raw/src/main.ts b/packages/ghproxy-raw/src/main.ts
index 26f0e8e..406cc8b 100644
--- a/packages/ghproxy-raw/src/main.ts
+++ b/packages/ghproxy-raw/src/main.ts
@@ -12,4 +12,4 @@ document.addEventListener("pjax:success", () => {
agentRaw(PROXY_URL);
});
-export {};
+export type {};
diff --git a/packages/ghproxy-raw/vite.config.ts b/packages/ghproxy-raw/vite.config.ts
index e854bb2..29c0dda 100644
--- a/packages/ghproxy-raw/vite.config.ts
+++ b/packages/ghproxy-raw/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/packages/ghproxy-releases/package.json b/packages/ghproxy-releases/package.json
index 9d019f2..f336dba 100644
--- a/packages/ghproxy-releases/package.json
+++ b/packages/ghproxy-releases/package.json
@@ -18,16 +18,10 @@
"url": "https://github.com/mogeko/userscripts/issues",
"email": "zhengjunyi@live.com"
},
- "keywords": [
- "userscript",
- "tampermonkey",
- "github"
- ],
+ "keywords": ["userscript", "tampermonkey", "github"],
"license": "MIT",
"scripts": {
- "build": "vite build",
- "lint": "prettier --check .",
- "fmt": "prettier --write ."
+ "build": "vite build"
},
"devDependencies": {
"@mogeko/tsconfig": "^0.0.4",
diff --git a/packages/ghproxy-releases/src/main.ts b/packages/ghproxy-releases/src/main.ts
index f8b36db..0a24440 100644
--- a/packages/ghproxy-releases/src/main.ts
+++ b/packages/ghproxy-releases/src/main.ts
@@ -1,15 +1,13 @@
const PROXY_URL = "https://ghproxy.com/";
function agentReleases(proxy: string) {
- const svgs = document.querySelectorAll(
+ for (const svg of document.querySelectorAll(
".octicon-package, .octicon-file-zip",
- );
-
- svgs.forEach((svg) => {
+ )) {
const link = svg.parentNode as HTMLLinkElement;
link.href = proxy + link.href;
- });
+ }
}
agentReleases(PROXY_URL);
@@ -18,4 +16,4 @@ document.addEventListener("pjax:success", () => {
agentReleases(PROXY_URL);
});
-export {};
+export type {};
diff --git a/packages/ghproxy-releases/vite.config.ts b/packages/ghproxy-releases/vite.config.ts
index fafa705..6e96694 100644
--- a/packages/ghproxy-releases/vite.config.ts
+++ b/packages/ghproxy-releases/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
export default defineConfig({
plugins: [
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 948ed90..ea7c936 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -8,6 +8,9 @@ importers:
.:
devDependencies:
+ '@biomejs/biome':
+ specifier: 1.8.3
+ version: 1.8.3
'@changesets/changelog-github':
specifier: ^0.5.0
version: 0.5.0
@@ -20,9 +23,6 @@ importers:
glob:
specifier: ^11.0.0
version: 11.0.0
- prettier:
- specifier: ^3.3.3
- version: 3.3.3
turbo:
specifier: ^2.1.1
version: 2.1.1
@@ -216,6 +216,59 @@ packages:
'@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
+ '@biomejs/biome@1.8.3':
+ resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==}
+ engines: {node: '>=14.21.3'}
+ hasBin: true
+
+ '@biomejs/cli-darwin-arm64@1.8.3':
+ resolution: {integrity: sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@biomejs/cli-darwin-x64@1.8.3':
+ resolution: {integrity: sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@biomejs/cli-linux-arm64-musl@1.8.3':
+ resolution: {integrity: sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@biomejs/cli-linux-arm64@1.8.3':
+ resolution: {integrity: sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@biomejs/cli-linux-x64-musl@1.8.3':
+ resolution: {integrity: sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [linux]
+
+ '@biomejs/cli-linux-x64@1.8.3':
+ resolution: {integrity: sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [linux]
+
+ '@biomejs/cli-win32-arm64@1.8.3':
+ resolution: {integrity: sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@biomejs/cli-win32-x64@1.8.3':
+ resolution: {integrity: sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [win32]
+
'@changesets/apply-release-plan@7.0.5':
resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==}
@@ -1234,11 +1287,6 @@ packages:
engines: {node: '>=10.13.0'}
hasBin: true
- prettier@3.3.3:
- resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}
- engines: {node: '>=14'}
- hasBin: true
-
pseudomap@1.0.2:
resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==}
@@ -1660,6 +1708,41 @@ snapshots:
'@bcoe/v8-coverage@0.2.3': {}
+ '@biomejs/biome@1.8.3':
+ optionalDependencies:
+ '@biomejs/cli-darwin-arm64': 1.8.3
+ '@biomejs/cli-darwin-x64': 1.8.3
+ '@biomejs/cli-linux-arm64': 1.8.3
+ '@biomejs/cli-linux-arm64-musl': 1.8.3
+ '@biomejs/cli-linux-x64': 1.8.3
+ '@biomejs/cli-linux-x64-musl': 1.8.3
+ '@biomejs/cli-win32-arm64': 1.8.3
+ '@biomejs/cli-win32-x64': 1.8.3
+
+ '@biomejs/cli-darwin-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-darwin-x64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-arm64-musl@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-x64-musl@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-x64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-win32-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-win32-x64@1.8.3':
+ optional: true
+
'@changesets/apply-release-plan@7.0.5':
dependencies:
'@changesets/config': 3.0.3
@@ -2718,8 +2801,6 @@ snapshots:
prettier@2.8.8: {}
- prettier@3.3.3: {}
-
pseudomap@1.0.2: {}
psl@1.9.0: {}
diff --git a/scripts/pack.ts b/scripts/pack.ts
index 1314b13..09129d4 100644
--- a/scripts/pack.ts
+++ b/scripts/pack.ts
@@ -1,17 +1,17 @@
import fs from "node:fs/promises";
import path from "node:path";
-import pkg from "../package.json";
import { glob } from "glob";
+import pkg from "../package.json";
-const baseURL = process.env["BASE_URL"] || "https://userscripts.mogeko.me";
+const baseURL = process.env.BASE_URL || "https://userscripts.mogeko.me";
const releaseDir = path.resolve(__dirname, "../release");
const releaseFiles = await glob("packages/*/dist/*.js", { ignore: "*/_*/**" });
await fs.mkdir(releaseDir, { recursive: true });
-releaseFiles.forEach(async (file) => {
+for (const file of releaseFiles) {
await fs.copyFile(file, path.resolve(releaseDir, path.basename(file)));
-});
+}
const meta = {
name: pkg.name,
@@ -33,5 +33,5 @@ const meta = {
await fs.writeFile(
path.resolve(__dirname, "../release/index.json"),
- JSON.stringify(meta, null, 2)
+ JSON.stringify(meta, null, 2),
);
diff --git a/turbo.json b/turbo.json
index 5082e4c..09cc046 100644
--- a/turbo.json
+++ b/turbo.json
@@ -7,9 +7,7 @@
"env": ["BASE_URL"]
},
"test": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", "tests"] },
- "cov": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", "tests"] },
- "lint": { "outputs": [] },
- "fmt": { "outputs": [], "cache": false }
+ "cov": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", "tests"] }
},
"globalEnv": ["NODE_ENV", "GITHUB_TOKEN"]
}