@adamhl8/configs 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +5 -5
  2. package/dist/configs/bask.base.d.ts +0 -2
  3. package/dist/configs/bask.base.d.ts.map +1 -1
  4. package/dist/configs/bask.base.js +1 -2
  5. package/dist/configs/bask.base.js.map +1 -1
  6. package/dist/configs/commitlint.base.d.ts +0 -2
  7. package/dist/configs/commitlint.base.d.ts.map +1 -1
  8. package/dist/configs/commitlint.base.js +1 -2
  9. package/dist/configs/knip.base.d.ts +0 -2
  10. package/dist/configs/knip.base.d.ts.map +1 -1
  11. package/dist/configs/knip.base.js +0 -1
  12. package/dist/configs/oxfmt.base.d.ts +0 -2
  13. package/dist/configs/oxfmt.base.d.ts.map +1 -1
  14. package/dist/configs/oxfmt.base.js +1 -2
  15. package/dist/configs/oxlint.base.d.ts +1 -2
  16. package/dist/configs/oxlint.base.d.ts.map +1 -1
  17. package/dist/configs/oxlint.base.js +2 -2
  18. package/dist/configs/oxlint.base.js.map +1 -1
  19. package/dist/configs/release-it.base.d.ts +0 -2
  20. package/dist/configs/release-it.base.d.ts.map +1 -1
  21. package/dist/configs/release-it.base.js +1 -2
  22. package/dist/configs/tsconfig.base.json +2 -0
  23. package/dist/configs/tsdown.base.d.ts +3 -7
  24. package/dist/configs/tsdown.base.d.ts.map +1 -1
  25. package/dist/configs/tsdown.base.js +3 -8
  26. package/dist/configs/tsdown.base.js.map +1 -1
  27. package/dist/env/index.d.ts +0 -2
  28. package/dist/env/index.d.ts.map +1 -1
  29. package/dist/env/index.js +1 -2
  30. package/dist/env/utils.d.ts +0 -2
  31. package/dist/env/utils.d.ts.map +1 -1
  32. package/dist/env/utils.js +1 -2
  33. package/dist/merge-config/merge-config.d.ts +0 -2
  34. package/dist/merge-config/merge-config.d.ts.map +1 -1
  35. package/dist/merge-config/merge-config.js +1 -2
  36. package/dist/merge-config/merge.types.d.ts +0 -2
  37. package/dist/merge-config/merge.types.d.ts.map +1 -1
  38. package/dist/utils.js +1 -2
  39. package/package.json +23 -23
package/README.md CHANGED
@@ -54,12 +54,12 @@ import { bumpDeps, lint } from "@adamhl8/configs/bask"
54
54
  export * from "@adamhl8/configs/bask"
55
55
 
56
56
  export const astroSync = task(async ({ sh }) => {
57
- await sh`bun astro sync`
57
+ await sh`astro sync`
58
58
  })
59
59
 
60
60
  lint.before(astroSync)
61
61
  bumpDeps.after(async ({ sh }) => {
62
- await sh`bun prisma generate`
62
+ await sh`prisma generate`
63
63
  })
64
64
  ```
65
65
 
@@ -67,11 +67,11 @@ The only script left in `package.json` is `prepare`, which hands off to bask:
67
67
 
68
68
  ```json
69
69
  "scripts": {
70
- "prepare": "bunx bask prepare"
70
+ "prepare": "bask prepare"
71
71
  }
72
72
  ```
73
73
 
74
- Scripts, git hooks, and the workflows run `bunx bask` rather than `bun bask`, because `bun bask` runs `bask.ts` instead of the bask bin.
74
+ The `prepare` script and task `sh` calls run local bins by their bare name, because `bun run` and bask both put `node_modules/.bin` on `PATH`. Git hooks and the workflows run `bunx bask` rather than `bun bask`, because `bun bask` runs `bask.ts` instead of the bask bin.
75
75
 
76
76
  ### tsconfig
77
77
 
@@ -331,6 +331,6 @@ Configure these on each repo that uses the workflows (Settings -> Secrets and va
331
331
 
332
332
  ## Notes
333
333
 
334
- The `prepare` script is `"prepare": "bunx bask prepare"`, which runs the base `prepare` task (`lefthook install` outside CI, the `.gitignore` sync, and the `bunfig.toml` sync).
334
+ The `prepare` script is `"prepare": "bask prepare"`, which runs the base `prepare` task (`lefthook install` outside CI, the `.gitignore` sync, and the `bunfig.toml` sync).
335
335
 
336
336
  bun links a dependency's `package.json` bin executables into the local `node_modules/.bin`, but not the bins of the package being developed itself. This repo depends on itself (`"@adamhl8/configs": "file:."`) so that its own bins can be run directly, e.g. `adamhl8-bunfig` instead of `src/adamhl8-bunfig/index.ts`. That's also why this repo's `bask.ts` runs `tsdown` before the `prepare` task: the bins point at `dist/`, so those builds need to be available.
@@ -1,4 +1,3 @@
1
- //#region src/configs/bask.base.d.ts
2
1
  export declare const tofuCheck: import("@adamhl8/bask").Task;
3
2
  export declare const prepare: import("@adamhl8/bask").Task;
4
3
  export declare const bumpDeps: import("@adamhl8/bask").Task;
@@ -8,5 +7,4 @@ export declare const build: import("@adamhl8/bask").Task;
8
7
  export declare const release: import("@adamhl8/bask").Task;
9
8
  export declare const releaseRun: import("@adamhl8/bask").Task;
10
9
  export declare const commitTypes: import("@adamhl8/bask").Task;
11
- //#endregion
12
10
  //# sourceMappingURL=bask.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bask.base.d.ts","names":[],"sources":["../../src/configs/bask.base.ts"],"mappings":";qBAyBa,mCAAS;qBAIT,iCAAO;qBASP,kCAAQ;qBAOR,8BAAI;qBAIJ,8BAAI;qBA0BJ,+BAAK;qBAYL,iCAAO;qBAIP,oCAAU;qBAIV,qCAAW"}
1
+ {"version":3,"file":"bask.base.d.ts","names":[],"sources":["../../src/configs/bask.base.ts"],"mappings":"A,qBAwBa,mCAAS;qBAIT,iCAAO;qBASP,kCAAQ;qBAOR,8BAAI;qBAIJ,8BAAI;qBA0BJ,+BAAK;qBAYL,iCAAO;qBAIP,oCAAU;qBAIV,qCAAW"}
@@ -2,7 +2,7 @@ import { resolveProjectTailwind } from "../utils.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { list, task } from "@adamhl8/bask";
4
4
  import bun, { $, Glob } from "bun";
5
- //#region src/configs/bask.base.ts
5
+ // src/configs/bask.base.ts
6
6
  const inCi = Boolean(process.env["CI"]);
7
7
  /** Lists tracked and untracked files matching the pathspecs, skipping gitignored ones. */
8
8
  const lsFiles = async (pathspecs) => {
@@ -75,7 +75,6 @@ list.after(async () => {
75
75
  console.log();
76
76
  await commitTypes();
77
77
  });
78
- //#endregion
79
78
  export { build, bumpDeps, commitTypes, lint, prepare, release, releaseRun, test, tofuCheck };
80
79
 
81
80
  //# sourceMappingURL=bask.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bask.base.js","names":[],"sources":["../../src/configs/bask.base.ts"],"sourcesContent":["import { existsSync } from \"node:fs\"\n\nimport { list, task } from \"@adamhl8/bask\"\nimport bun, { $, Glob } from \"bun\"\n\nimport { resolveProjectTailwind } from \"#utils.ts\"\n\n// oxlint-disable-next-line node/no-process-env - read `CI` directly because the CI runner sets it\nconst inCi = Boolean(process.env[\"CI\"])\n\n/** Lists tracked and untracked files matching the pathspecs, skipping gitignored ones. */\nconst lsFiles = async (pathspecs: string[]) => {\n const output = await $`git ls-files -z --cached --others --exclude-standard -- ${pathspecs}`.quiet().text()\n return output.split(\"\\0\").filter(Boolean)\n}\n\n/** Checks that we're not in CI, the repo has a root tofu module, and the aws profile exists on this machine. */\nconst canRunTofu = async () => {\n if (inCi) return false\n const tofuFiles = await Array.fromAsync(new Glob(\"*.tofu\").scan())\n if (tofuFiles.length === 0) return false\n const profiles = await $`aws configure list-profiles`.nothrow().quiet().text()\n return profiles.split(\"\\n\").includes(\"adamhl8\")\n}\n\nexport const tofuCheck = task(async ({ sh }) => {\n if (await canRunTofu()) await sh`tofu plan -detailed-exitcode -concise -compact-warnings`\n})\n\nexport const prepare = task(async ({ sh }) => {\n // Skip `lefthook install` in CI so commits made by the workflows don't run the hooks.\n if (!inCi) await sh`lefthook install`\n await sh`bun adamhl8-gitignore`\n await sh`bun adamhl8-bunfig`\n await sh`bun oxfmt bunfig.toml`\n if (await canRunTofu()) await sh`tofu init -upgrade`\n})\n\nexport const bumpDeps = task(async ({ sh }) => {\n await sh`bunx npm-check-updates --upgrade --format group`\n await sh`rm -f bun.lock`\n await sh`rm -rf node_modules/`\n await sh`bun install --no-summary --no-cache`\n})\n\nexport const test = task(async ({ sh }) => {\n await sh`bun test --pass-with-no-tests`.echo(false)\n})\n\nexport const lint = task(async ({ sh }) => {\n await sh`bun markdown-toc -i --bullets - --maxdepth 3 ./README.md`\n await sh`bun oxlint --fix --fix-suggestions --fix-dangerously`\n await sh`bun oxfmt`\n\n if (resolveProjectTailwind()) {\n // Check for `.astro` files first so projects without them don't need tailwint installed.\n const astroFiles = await lsFiles([\":(glob)**/*.astro\"])\n // Skip `--fix` because tailwint resolves a class conflict by deleting a class by position, not by which one wins.\n if (astroFiles.length > 0) await sh`bun tailwint \"**/*.astro\"`\n }\n\n const tofuFiles = await lsFiles([\n \":(glob)**/*.tf\",\n \":(glob)**/*.tofu\",\n \":(glob)**/*.tfvars\",\n \":(glob)**/*.tftest.hcl\",\n \":(glob)**/*.tofutest.hcl\",\n ])\n if (tofuFiles.length > 0) await sh`tofu fmt ${tofuFiles}`\n\n await sh`bun knip-bun`\n if (existsSync(\".github/workflows\")) await sh`actionlint`\n await test()\n})\n\nexport const build = task(async ({ sh }) => {\n await lint()\n if (await bun.file(\"tsdown.config.ts\").exists()) await sh`bun tsdown`\n // Fail in CI if the build changed or created any files, because lint fixes and formatting are applied in place.\n // `--intent-to-add` makes untracked files show up in the diff.\n if (inCi) {\n await sh`git add --intent-to-add --all`\n await sh`git diff --exit-code`\n }\n await tofuCheck()\n})\n\nexport const release = task(async ({ sh }) => {\n await sh`gh workflow run release.yml`\n})\n\nexport const releaseRun = task({ hidden: true }, async ({ sh }) => {\n await sh`bun release-it -VV --ci`\n})\n\nexport const commitTypes = task(async ({ sh }) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - trust the shape that `commitlint --print-config json` prints\n const config = (await sh`bun commitlint --print-config json`.echo(false).json()) as {\n rules: { \"type-enum\": [number, string, string[]] }\n }\n const { 2: types } = config.rules[\"type-enum\"]\n console.log(`Commit types:\\n ${types.join(\"\\n \")}`)\n})\n\nlist.after(async () => {\n console.log()\n await commitTypes()\n})\n"],"mappings":";;;;;AAQA,MAAM,OAAO,QAAQ,QAAQ,IAAI,KAAK;;AAGtC,MAAM,UAAU,OAAO,cAAwB;CAE7C,QAAO,MADc,CAAC,2DAA2D,YAAY,MAAM,CAAC,CAAC,KAAK,E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KAAK;AACb,CAAC;AAED,MAAa,QAAQ,KAAK,OAAO,EAAE,SAAS;CAC1C,MAAM,KAAK;CACX,IAAI,MAAM,IAAI,KAAK,kBAAkB,CAAC,CAAC,OAAO,GAAG,MAAM,EAAE;CAGzD,IAAI,MAAM;EACR,MAAM,EAAE;EACR,MAAM,EAAE;CACV;CACA,MAAM,UAAU;AAClB,CAAC;AAED,MAAa,UAAU,KAAK,OAAO,EAAE,SAAS;CAC5C,MAAM,EAAE;AACV,CAAC;AAED,MAAa,aAAa,KAAK,EAAE,QAAQ,KAAK,GAAG,OAAO,EAAE,SAAS;CACjE,MAAM,EAAE;AACV,CAAC;AAED,MAAa,cAAc,KAAK,OAAO,EAAE,SAAS;CAKhD,MAAM,EAAE,GAAG,WAAU,MAHC,EAAE,qCAAqC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAA,CAGlD,MAAM;CAClC,QAAQ,IAAI,sBAAsB,MAAM,KAAK,QAAQ,GAAG;AAC1D,CAAC;AAED,KAAK,MAAM,YAAY;CACrB,QAAQ,IAAI;CACZ,MAAM,YAAY;AACpB,CAAC"}
1
+ {"version":3,"file":"bask.base.js","names":[],"sources":["../../src/configs/bask.base.ts"],"sourcesContent":["import { existsSync } from \"node:fs\"\n\nimport { list, task } from \"@adamhl8/bask\"\nimport bun, { $, Glob } from \"bun\"\n\nimport { resolveProjectTailwind } from \"#utils.ts\"\n\nconst inCi = Boolean(process.env[\"CI\"])\n\n/** Lists tracked and untracked files matching the pathspecs, skipping gitignored ones. */\nconst lsFiles = async (pathspecs: string[]) => {\n const output = await $`git ls-files -z --cached --others --exclude-standard -- ${pathspecs}`.quiet().text()\n return output.split(\"\\0\").filter(Boolean)\n}\n\n/** Checks that we're not in CI, the repo has a root tofu module, and the aws profile exists on this machine. */\nconst canRunTofu = async () => {\n if (inCi) return false\n const tofuFiles = await Array.fromAsync(new Glob(\"*.tofu\").scan())\n if (tofuFiles.length === 0) return false\n const profiles = await $`aws configure list-profiles`.nothrow().quiet().text()\n return profiles.split(\"\\n\").includes(\"adamhl8\")\n}\n\nexport const tofuCheck = task(async ({ sh }) => {\n if (await canRunTofu()) await sh`tofu plan -detailed-exitcode -concise -compact-warnings`\n})\n\nexport const prepare = task(async ({ sh }) => {\n // Skip `lefthook install` in CI so commits made by the workflows don't run the hooks.\n if (!inCi) await sh`lefthook install`\n await sh`bun adamhl8-gitignore`\n await sh`bun adamhl8-bunfig`\n await sh`bun oxfmt bunfig.toml`\n if (await canRunTofu()) await sh`tofu init -upgrade`\n})\n\nexport const bumpDeps = task(async ({ sh }) => {\n await sh`bunx npm-check-updates --upgrade --format group`\n await sh`rm -f bun.lock`\n await sh`rm -rf node_modules/`\n await sh`bun install --no-summary --no-cache`\n})\n\nexport const test = task(async ({ sh }) => {\n await sh`bun test --pass-with-no-tests`.echo(false)\n})\n\nexport const lint = task(async ({ sh }) => {\n await sh`bun markdown-toc -i --bullets - --maxdepth 3 ./README.md`\n await sh`bun oxlint --fix --fix-suggestions --fix-dangerously`\n await sh`bun oxfmt`\n\n if (resolveProjectTailwind()) {\n // Check for `.astro` files first so projects without them don't need tailwint installed.\n const astroFiles = await lsFiles([\":(glob)**/*.astro\"])\n // Skip `--fix` because tailwint resolves a class conflict by deleting a class by position, not by which one wins.\n if (astroFiles.length > 0) await sh`bun tailwint \"**/*.astro\"`\n }\n\n const tofuFiles = await lsFiles([\n \":(glob)**/*.tf\",\n \":(glob)**/*.tofu\",\n \":(glob)**/*.tfvars\",\n \":(glob)**/*.tftest.hcl\",\n \":(glob)**/*.tofutest.hcl\",\n ])\n if (tofuFiles.length > 0) await sh`tofu fmt ${tofuFiles}`\n\n await sh`bun knip-bun`\n if (existsSync(\".github/workflows\")) await sh`actionlint`\n await test()\n})\n\nexport const build = task(async ({ sh }) => {\n await lint()\n if (await bun.file(\"tsdown.config.ts\").exists()) await sh`bun tsdown`\n // Fail in CI if the build changed or created any files, because lint fixes and formatting are applied in place.\n // `--intent-to-add` makes untracked files show up in the diff.\n if (inCi) {\n await sh`git add --intent-to-add --all`\n await sh`git diff --exit-code`\n }\n await tofuCheck()\n})\n\nexport const release = task(async ({ sh }) => {\n await sh`gh workflow run release.yml`\n})\n\nexport const releaseRun = task({ hidden: true }, async ({ sh }) => {\n await sh`bun release-it -VV --ci`\n})\n\nexport const commitTypes = task(async ({ sh }) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - trust the shape that `commitlint --print-config json` prints\n const config = (await sh`bun commitlint --print-config json`.echo(false).json()) as {\n rules: { \"type-enum\": [number, string, string[]] }\n }\n const { 2: types } = config.rules[\"type-enum\"]\n console.log(`Commit types:\\n ${types.join(\"\\n \")}`)\n})\n\nlist.after(async () => {\n console.log()\n await commitTypes()\n})\n"],"mappings":";;;;;AAOA,MAAM,OAAO,QAAQ,QAAQ,IAAI,KAAK;;AAGtC,MAAM,UAAU,OAAO,cAAwB;CAE7C,QAAO,MADc,CAAC,2DAA2D,YAAY,MAAM,CAAC,CAAC,KAAK,EAAA,CAC5F,MAAM,IAAI,CAAC,CAAC,OAAO,OAAO;AAC1C;;AAGA,MAAM,aAAa,YAAY;CAC7B,IAAI,MAAM,OAAO;CAEjB,KAAI,MADoB,MAAM,UAAU,IAAI,KAAK,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAA,CACnD,WAAW,GAAG,OAAO;CAEnC,QAAO,MADgB,CAAC,8BAA8B,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAA,CAC7D,MAAM,IAAI,CAAC,CAAC,SAAS,SAAS;AAChD;AAEA,MAAa,YAAY,KAAK,OAAO,EAAE,SAAS;CAC9C,IAAI,MAAM,WAAW,GAAG,MAAM,EAAE;AAClC,CAAC;AAED,MAAa,UAAU,KAAK,OAAO,EAAE,SAAS;CAE5C,IAAI,CAAC,MAAM,MAAM,EAAE;CACnB,MAAM,EAAE;CACR,MAAM,EAAE;CACR,MAAM,EAAE;CACR,IAAI,MAAM,WAAW,GAAG,MAAM,EAAE;AAClC,CAAC;AAED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M,YAAY;CACrB,QAAQ,IAAI;CACZ,MAAM,YAAY;AACpB,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import { OptionalMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { UserConfig } from "@commitlint/types";
3
- //#region src/configs/commitlint.base.d.ts
4
3
  export declare const commitlintConfig: OptionalMergeConfigFn<UserConfig, {
5
4
  readonly extends: ["@commitlint/config-conventional"];
6
5
  readonly rules: {
7
6
  readonly "type-enum": readonly [2, "always", string[]];
8
7
  };
9
8
  }>;
10
- //#endregion
11
9
  //# sourceMappingURL=commitlint.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commitlint.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/commitlint.base.ts"],"mappings":";;;qBAkBa,kBAAgBA,sBAAA;;;aAJzB"}
1
+ {"version":3,"file":"commitlint.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/commitlint.base.ts"],"mappings":";;qBAkBa,kBAAgBA,sBAAA;;;aAJzB"}
@@ -1,6 +1,6 @@
1
1
  import { createMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import conventional from "@commitlint/config-conventional";
3
- //#region src/configs/commitlint.base.ts
3
+ // src/configs/commitlint.base.ts
4
4
  const [_severity, _condition, conventionalTypes] = conventional.rules["type-enum"];
5
5
  const EXCLUDED_TYPES = /* @__PURE__ */ new Set([
6
6
  "test",
@@ -20,7 +20,6 @@ const baseConfig = {
20
20
  ] }
21
21
  };
22
22
  const commitlintConfig = createMergeConfigFn(baseConfig);
23
- //#endregion
24
23
  export { commitlintConfig };
25
24
 
26
25
  //# sourceMappingURL=commitlint.base.js.map
@@ -1,11 +1,9 @@
1
1
  import { OptionalMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { KnipConfig } from "knip";
3
- //#region src/configs/knip.base.d.ts
4
3
  export declare const knipConfig: OptionalMergeConfigFn<KnipConfig, {
5
4
  readonly project: ["**/*"];
6
5
  readonly bun: {
7
6
  readonly entry: ["**/*.test.ts", "bask.ts"];
8
7
  };
9
8
  }>;
10
- //#endregion
11
9
  //# sourceMappingURL=knip.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;qBAaa,YAAUA,sBAAA;;;aAJnB"}
1
+ {"version":3,"file":"knip.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/knip.base.ts"],"mappings":";;qBAaa,YAAUA,sBAAA;;;aAJnB"}
@@ -3,7 +3,6 @@ const knipConfig = createMergeConfigFn({
3
3
  project: ["**/*"],
4
4
  bun: { entry: ["**/*.test.ts", "bask.ts"] }
5
5
  });
6
- //#endregion
7
6
  export { knipConfig };
8
7
 
9
8
  //# sourceMappingURL=knip.base.js.map
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { OxfmtConfig } from "oxfmt";
3
- //#region src/configs/oxfmt.base.d.ts
4
3
  export declare const oxfmtConfig: OptionalMergeConfigFn<OxfmtConfig, {
5
4
  readonly printWidth: 120;
6
5
  readonly semi: false;
@@ -19,5 +18,4 @@ export declare const oxfmtConfig: OptionalMergeConfigFn<OxfmtConfig, {
19
18
  stylesheet: string;
20
19
  };
21
20
  }>;
22
- //#endregion
23
21
  //# sourceMappingURL=oxfmt.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oxfmt.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/oxfmt.base.ts"],"mappings":";;;qBA4Ba,aAAWA,sBAAA;WApBV;;;aAEH;;WACqB;;;aAG5B;;;aASiB"}
1
+ {"version":3,"file":"oxfmt.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/oxfmt.base.ts"],"mappings":";;qBA4Ba,aAAWA,sBAAA;WApBV;;;aAEH;;WACqB;;;aAG5B;;;aASiB"}
@@ -1,6 +1,6 @@
1
1
  import { createMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { resolveProjectTailwind } from "../utils.js";
3
- //#region src/configs/oxfmt.base.ts
3
+ // src/configs/oxfmt.base.ts
4
4
  const tailwindStylesheet = resolveProjectTailwind();
5
5
  const oxfmtConfig = createMergeConfigFn({
6
6
  printWidth: 120,
@@ -23,7 +23,6 @@ const oxfmtConfig = createMergeConfigFn({
23
23
  sortPackageJson: { sortScripts: true },
24
24
  sortTailwindcss: tailwindStylesheet ? { stylesheet: tailwindStylesheet } : true
25
25
  });
26
- //#endregion
27
26
  export { oxfmtConfig };
28
27
 
29
28
  //# sourceMappingURL=oxfmt.base.js.map
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { DummyRule, OxlintConfig, OxlintOverride } from "oxlint";
3
- //#region src/configs/oxlint.base.d.ts
4
3
  type PluginRules = Record<string, DummyRule>;
5
4
  export declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
6
5
  options: {
@@ -102,6 +101,7 @@ export declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
102
101
  "jsdoc/require-param": "off";
103
102
  "jsdoc/require-returns": "off";
104
103
  "node/callback-return": "off";
104
+ "node/no-process-env": "off";
105
105
  "node/no-sync": "off";
106
106
  "node/no-top-level-await": "off";
107
107
  "oxc/no-async-await": "off";
@@ -145,6 +145,5 @@ export declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
145
145
  [k: string]: unknown;
146
146
  };
147
147
  }>;
148
- //#endregion
149
148
  export {};
150
149
  //# sourceMappingURL=oxlint.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;KAmBK,cAAc,eAAe;qBAmUrB,cA/T4CA,sBA+ThC;;aAvMrB;aACA;aACA;;;aAIA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;eA+BI;;;;;eAMA;eACA;;;;;eAMA;;;;;;;;;;IAhLiD,QAAA;;;;;;eAgMF;;;eAI9B;eAA2C;;;eAER;eAA4B;eAAiB;;;;iBAKxF;iBAAiB;;;;;;IAON;IACX;IACQ;IACG;IACX;IACa;IACR;IACJ;IACC;IACS;IACF;IACF;IACL;IACI;IACL;IACF;IACI;IACK;IACV;IACA;IACM;IACD;IACH;IAEU;IACC;IACG;IACD;IACE;IACG;IACC;IAET;IACE;IAED;IACR;IACW;IAEL;IACM;IACK;IAEO;IACR;IACjB;IACI;IACa;IACT;IACE;IACE;IACW;IACV;IACF;IACZ;IAEkB;IACY;IACC;IACC;IACL;IAEF;IACE;IACH;IACX;IACI;IACD;IAEX;IACmB;IACG;IACN;IACO;IACT;IACJ;IACC;IACP;IACQ"}
1
+ {"version":3,"file":"oxlint.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;KAmBK,cAAc,eAAe;qBAoUrB,cAhU4CA,sBAgUhC;;aAxMrB;aACA;aACA;;;aAIA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;eA+BI;;;;;eAMA;eACA;;;;;eAMA;;;;;;;;;;IAhLiD,QAAA;;;;;;eAgMF;;;eAI9B;eAA2C;;;eAER;eAA4B;eAAiB;;;;iBAKxF;iBAAiB;;;;;;IAON;IACX;IACQ;IACG;IACX;IACa;IACR;IACJ;IACC;IACS;IACF;IACF;IACL;IACI;IACL;IACF;IACI;IACK;IACV;IACA;IACM;IACD;IACH;IAEU;IACC;IACG;IACD;IACE;IACG;IACC;IAET;IACE;IAED;IACD;IACP;IACW;IAEL;IACM;IACK;IAEO;IACR;IACjB;IACI;IACa;IACT;IACE;IACE;IACW;IACV;IACF;IACZ;IAEkB;IACY;IACC;IACC;IACL;IAEF;IACE;IACH;IACX;IACI;IACD;IAEX;IACmB;IACG;IACN;IACO;IACT;IACJ;IACC;IACP;IACQ"}
@@ -9,7 +9,7 @@ import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
9
9
  import { rules } from "eslint-plugin-regexp";
10
10
  import { rules as rules$1 } from "oxlint-plugin-directive-comments";
11
11
  import tailwindcssPlugin from "oxlint-tailwindcss";
12
- //#region src/configs/oxlint.base.ts
12
+ // src/configs/oxlint.base.ts
13
13
  /** Sets every rule in a JS plugin to `severity`, because `categories` doesn't apply to JS plugins. */
14
14
  const setAllPluginRules = (name, rules, severity) => Object.fromEntries(Object.keys(rules).map((rule) => [`${name}/${rule}`, severity]));
15
15
  const { dependencies, engines } = readProjectPackageJson();
@@ -231,6 +231,7 @@ const nativeConfig = {
231
231
  "jsdoc/require-param": "off",
232
232
  "jsdoc/require-returns": "off",
233
233
  "node/callback-return": "off",
234
+ "node/no-process-env": "off",
234
235
  "node/no-sync": "off",
235
236
  "node/no-top-level-await": "off",
236
237
  "oxc/no-async-await": "off",
@@ -296,7 +297,6 @@ const baseConfig = {
296
297
  settings: pluginSettings
297
298
  };
298
299
  const oxlintConfig = createMergeConfigFn(baseConfig);
299
- //#endregion
300
300
  export { oxlintConfig };
301
301
 
302
302
  //# sourceMappingURL=oxlint.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.js","names":["directiveCommentsPluginRules","regexpPluginRules"],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import cleanModulesPlugin from \"@adamhl8/eslint-plugin-clean-modules\"\nimport e18ePlugin from \"@e18e/eslint-plugin\"\nimport bunismsPlugin from \"eslint-plugin-bunisms\"\nimport honoPlugin from \"eslint-plugin-hono\"\nimport reactWebApiPlugin from \"eslint-plugin-react-web-api\"\nimport reactEffectPlugin from \"eslint-plugin-react-you-might-not-need-an-effect\"\nimport { rules as regexpPluginRules } from \"eslint-plugin-regexp\"\nimport type { DummyRule, OxlintConfig, OxlintOverride } from \"oxlint\"\nimport { rules as directiveCommentsPluginRules } from \"oxlint-plugin-directive-comments\"\nimport tailwindcssPlugin from \"oxlint-tailwindcss\"\n\nimport { createMergeConfigFn } from \"#merge-config/merge-config.ts\"\nimport { readProjectPackageJson, resolvePackagePath, resolveProjectTailwind } from \"#utils.ts\"\n\n/** Sets every rule in a JS plugin to `severity`, because `categories` doesn't apply to JS plugins. */\nconst setAllPluginRules = (name: string, rules: Record<string, unknown>, severity: \"error\" | \"off\") =>\n Object.fromEntries(Object.keys(rules).map((rule) => [`${name}/${rule}`, severity] as const))\n\n// Type plugin rules with oxlint's generic `DummyRule` because its per-rule config types aren't exported, which breaks declaration emit.\ntype PluginRules = Record<string, DummyRule>\n\n/** A JS plugin and the slice of oxlint config that goes with it. Each one is merged into the base config. */\ninterface PluginPart extends Omit<OxlintConfig, \"jsPlugins\" | \"overrides\" | \"rules\"> {\n overrides?: (Omit<OxlintOverride, \"rules\"> & { rules?: PluginRules })[]\n rules?: PluginRules\n /** Loads the plugin only when true. Defaults to true. */\n enabled?: boolean\n package: string\n /** The plugin's rule definitions, used to set every rule to \"error\". The part's own `rules` then take precedence. */\n pluginRules: Record<string, unknown> | undefined\n}\n\nconst { dependencies, engines } = readProjectPackageJson()\nconst tailwindStylesheet = resolveProjectTailwind()\n\n// Key each part by the rule namespace its plugin registers.\nconst plugins: Record<string, PluginPart> = {\n bunisms: {\n overrides: [\n {\n excludeFiles: [\"src/**/__tests__/**\", \"src/**/*.test.{ts,tsx}\", \"src/**/test-setup.ts\", \"src/**/test-utils.ts\"],\n // Turn off Bun suggestions in Node runtime code. Tests and tooling still run on Bun.\n files: engines.has(\"node\") ? [\"src/**\"] : [],\n rules: setAllPluginRules(\"bunisms\", bunismsPlugin.rules, \"off\"),\n },\n ],\n package: \"eslint-plugin-bunisms\",\n pluginRules: bunismsPlugin.rules,\n rules: {\n \"bunisms/prefer-mock-restore-in-after-each\": \"off\", // `test-setup.ts` preloads restore mocks globally\n },\n },\n \"clean-modules\": {\n package: \"@adamhl8/eslint-plugin-clean-modules\",\n pluginRules: cleanModulesPlugin.rules,\n },\n \"directive-comments\": {\n package: \"oxlint-plugin-directive-comments\",\n pluginRules: directiveCommentsPluginRules,\n rules: {\n \"directive-comments/disable-enable-pair\": [\"error\", { allowWholeFile: true }],\n \"directive-comments/no-use\": \"off\", // bans every directive comment\n },\n },\n e18e: {\n package: \"@e18e/eslint-plugin\",\n pluginRules: e18ePlugin.rules,\n rules: {\n \"e18e/no-indexof-equality\": \"off\", // needs type information, which JS plugins don't get\n \"e18e/no-spread-in-reduce\": \"off\", // `oxc/no-accumulating-spread` covers this\n \"e18e/prefer-array-at\": \"off\", // `unicorn/prefer-at` covers this\n \"e18e/prefer-array-some\": \"off\", // `unicorn/prefer-array-some` covers this\n \"e18e/prefer-array-to-reversed\": \"off\", // `unicorn/no-array-reverse` covers this\n \"e18e/prefer-array-to-sorted\": \"off\", // `unicorn/no-array-sort` covers this\n \"e18e/prefer-date-now\": \"off\", // `unicorn/prefer-date-now` covers this\n \"e18e/prefer-exponentiation-operator\": \"off\", // `prefer-exponentiation-operator` covers this\n \"e18e/prefer-flatmap-over-map-flat\": \"off\", // `unicorn/prefer-array-flat-map` covers this\n \"e18e/prefer-includes\": \"off\", // `unicorn/prefer-includes` covers this\n \"e18e/prefer-nullish-coalescing\": \"off\", // `typescript/prefer-nullish-coalescing` covers this\n \"e18e/prefer-object-has-own\": \"off\", // `prefer-object-has-own` covers this\n \"e18e/prefer-slice-over-split-index\": \"off\",\n \"e18e/prefer-spread-syntax\": \"off\", // `unicorn/prefer-spread` and `prefer-object-spread` cover this\n },\n },\n hono: {\n enabled: dependencies.has(\"hono\"),\n package: \"eslint-plugin-hono\",\n pluginRules: honoPlugin.rules,\n rules: {\n \"hono/no-process-env\": \"off\", // `node/no-process-env` covers this\n },\n },\n \"react-web-api\": {\n enabled: dependencies.has(\"react\"),\n package: \"eslint-plugin-react-web-api\",\n pluginRules: reactWebApiPlugin.rules,\n },\n \"react-you-might-not-need-an-effect\": {\n enabled: dependencies.has(\"react\"),\n package: \"eslint-plugin-react-you-might-not-need-an-effect\",\n pluginRules: reactEffectPlugin.rules,\n rules: {\n \"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-chain-state-updates\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-derived-state\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-initialize-state\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change\": \"off\", // `react/set-state-in-effect` covers this\n },\n },\n regexp: {\n package: \"eslint-plugin-regexp\",\n pluginRules: regexpPluginRules,\n rules: {\n \"regexp/letter-case\": [\"error\", { hexadecimalEscape: \"uppercase\", unicodeEscape: \"uppercase\" }], // match `unicorn/escape-case`\n \"regexp/no-control-character\": \"off\", // `no-control-regex` covers this\n \"regexp/no-empty-character-class\": \"off\", // `no-empty-character-class` covers this\n \"regexp/no-invalid-regexp\": \"off\", // `no-invalid-regexp` covers this\n \"regexp/no-super-linear-move\": \"off\",\n \"regexp/no-useless-escape\": \"off\", // `no-useless-escape` covers this\n \"regexp/prefer-named-capture-group\": \"off\", // `prefer-named-capture-group` covers this\n \"regexp/require-unicode-regexp\": \"off\", // `require-unicode-regexp` covers this\n \"regexp/require-unicode-sets-regexp\": \"off\", // `require-unicode-regexp` covers this\n \"regexp/sort-alternatives\": \"off\",\n },\n },\n tailwindcss: {\n // Load the Tailwind plugin only with a stylesheet because it reports every class string without one.\n enabled: Boolean(tailwindStylesheet),\n package: \"oxlint-tailwindcss\",\n pluginRules: tailwindcssPlugin.rules,\n rules: {\n \"tailwindcss/enforce-consistent-line-wrapping\": \"off\", // oxfmt handles line width\n \"tailwindcss/enforce-logical\": \"off\", // conflicts with `tailwindcss/enforce-physical`\n \"tailwindcss/enforce-sort-order\": \"off\", // oxfmt sorts classes\n \"tailwindcss/max-class-count\": \"off\",\n },\n // Keep `entryPoint` relative because the plugin resolves it against the directory of the project's oxlint config.\n settings: { tailwindcss: { entryPoint: tailwindStylesheet } },\n },\n}\n\nconst nativeConfig = {\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n\n categories: {\n correctness: \"error\",\n nursery: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n\n plugins: [\n \"eslint\",\n \"react\",\n \"unicorn\",\n \"typescript\",\n \"oxc\",\n \"import\",\n \"jsdoc\",\n \"vitest\",\n \"jsx-a11y\",\n \"react-perf\",\n \"promise\",\n \"node\",\n ],\n\n overrides: [\n {\n files: [\n \".release-it.ts\",\n \"astro.config.ts\",\n \"commitlint.config.ts\",\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \"prisma.config.ts\",\n \"tsdown.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n {\n files: [\"bask.ts\"],\n rules: {\n \"clean-modules/require-direct-exports\": \"off\",\n \"import/export\": \"off\",\n },\n },\n {\n files: [\".release-it.ts\"],\n rules: {\n \"no-template-curly-in-string\": \"off\",\n },\n },\n {\n files: [\"**/*.tsx\"],\n rules: {\n \"func-style\": [\"error\", \"declaration\", { allowArrowFunctions: true }],\n },\n },\n ],\n\n rules: {\n /* Modified rules */\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"function-declaration\", unnamedComponents: \"arrow-function\" },\n ],\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", propElementValues: \"always\", props: \"never\" }],\n\n \"unicorn/filename-case\": [\n \"error\",\n {\n cases: { kebabCase: true, pascalCase: true },\n },\n ],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n /* Disabled rules */\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"init-declarations\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-console\": \"off\",\n \"no-continue\": \"off\",\n \"no-duplicate-imports\": \"off\",\n \"no-inline-comments\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-plusplus\": \"off\",\n \"no-regex-spaces\": \"off\", // `regexp/prefer-quantifier` covers this\n \"no-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"no-void\": \"off\",\n \"one-var\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"off\",\n \"import/prefer-default-export\": \"off\",\n\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n\n \"node/callback-return\": \"off\",\n \"node/no-sync\": \"off\",\n \"node/no-top-level-await\": \"off\",\n\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n\n \"react/exhaustive-effect-dependencies\": \"off\", // `react/exhaustive-deps` covers this\n \"react/forbid-component-props\": \"off\",\n \"react/hooks\": \"off\", // `react/rules-of-hooks` covers this\n \"react/invariant\": \"off\",\n \"react/jsx-filename-extension\": \"off\",\n \"react/jsx-max-depth\": \"off\",\n \"react/jsx-no-literals\": \"off\",\n \"react/memo-dependencies\": \"off\", // `react/exhaustive-deps` covers this\n \"react/no-deriving-state-in-effects\": \"off\", // `react/set-state-in-effect` covers this\n \"react/react-in-jsx-scope\": \"off\",\n \"react/rule-suppression\": \"off\",\n \"react/todo\": \"off\",\n\n \"typescript/consistent-return\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n\n \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/no-await-expression-member\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n\n \"vitest/no-hooks\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-describe-function-title\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/prefer-importing-vitest-globals\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/require-hook\": \"off\", // reenable when false positives are fixed?\n \"vitest/require-test-timeout\": \"off\",\n },\n} as const satisfies OxlintConfig\n\nconst enabledPluginEntries = Object.entries(plugins).filter(([, plugin]) => plugin.enabled ?? true)\nconst enabledPlugins = enabledPluginEntries.map(([, plugin]) => plugin)\n// Resolve JS plugins to absolute paths so consumers load them from this package's own deps.\nconst resolvedPluginPackages = enabledPlugins.map((plugin) => resolvePackagePath(plugin.package))\nconst pluginOverrides = enabledPlugins.flatMap((plugin) => plugin.overrides ?? [])\nconst pluginSettings = Object.fromEntries(enabledPlugins.flatMap((plugin) => Object.entries(plugin.settings ?? {})))\n\n/** Lists a plugin's rules as entries */\nconst toPluginRuleEntries = ([name, { pluginRules = {}, rules }]: [string, PluginPart]) => {\n const defaultRules = setAllPluginRules(name, pluginRules, \"error\")\n const pluginRuleEntries = Object.entries({ ...defaultRules, ...rules })\n return pluginRuleEntries\n}\n\nconst resolvedPluginRules = Object.fromEntries(enabledPluginEntries.flatMap(toPluginRuleEntries))\n\nconst baseConfig = {\n ...nativeConfig,\n jsPlugins: resolvedPluginPackages,\n overrides: [...nativeConfig.overrides, ...pluginOverrides],\n rules: {\n ...resolvedPluginRules,\n ...nativeConfig.rules,\n },\n settings: pluginSettings,\n} satisfies OxlintConfig\n\nexport const oxlintConfig = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,qBAAqB,MAAc,OAAgC,aACvE,OAAO,YAAY,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,SAAS,CAAC,GAAG,KAAK,GAAG,QAAQ,QAAQ,CAAU,CAAC;AAgB7F,MAAM,EAAE,cAAc,YAAY,uBAAuB;AACzD,MAAM,qBAAqB,uBAAuB;AAGlD,MAAM,UAAsC;CAC1C,SAAS;EACP,WAAW,CACT;GACE,cAAc;IAAC;IAAuB;IAA0B;IAAwB;GAAsB;GAE9G,OAAO,QAAQ,IAAI,MAAM,IAAI,CAAC,QAAQ,IAAI,CAAC;GAC3C,OAAO,kBAAkB,WAAW,cAAc,OAAO,KAAK;EAChE,CACF;EACA,SAAS;EACT,aAAa,cAAc;EAC3B,OAAO,EACL,6CAA6C,MAC/C;CACF;CACA,iBAAiB;EACf,SAAS;EACT,aAAa,mBAAmB;CAClC;CACA,sBAAsB;EACpB,SAAS;EACT,aAAaA;EACb,OAAO;GACL,0CAA0C,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAC;GAC5E,6BAA6B;EAC/B;CACF;CACA,MAAM;EACJ,SAAS;EACT,aAAa,WAAW;EACxB,OAAO;GACL,4BAA4B;GAC5B,4BAA4B;GAC5B,wBAAwB;GACxB,0BAA0B;GAC1B,iCAAiC;GACjC,+BAA+B;GAC/B,wBAAwB;GACxB,uCAAuC;GACvC,qCAAqC;GACrC,wBAAwB;GACxB,kCAAkC;GAClC,8BAA8B;GAC9B,sCAAsC;GACtC,6BAA6B;EAC/B;CACF;CACA,MAAM;E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"],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import cleanModulesPlugin from \"@adamhl8/eslint-plugin-clean-modules\"\nimport e18ePlugin from \"@e18e/eslint-plugin\"\nimport bunismsPlugin from \"eslint-plugin-bunisms\"\nimport honoPlugin from \"eslint-plugin-hono\"\nimport reactWebApiPlugin from \"eslint-plugin-react-web-api\"\nimport reactEffectPlugin from \"eslint-plugin-react-you-might-not-need-an-effect\"\nimport { rules as regexpPluginRules } from \"eslint-plugin-regexp\"\nimport type { DummyRule, OxlintConfig, OxlintOverride } from \"oxlint\"\nimport { rules as directiveCommentsPluginRules } from \"oxlint-plugin-directive-comments\"\nimport tailwindcssPlugin from \"oxlint-tailwindcss\"\n\nimport { createMergeConfigFn } from \"#merge-config/merge-config.ts\"\nimport { readProjectPackageJson, resolvePackagePath, resolveProjectTailwind } from \"#utils.ts\"\n\n/** Sets every rule in a JS plugin to `severity`, because `categories` doesn't apply to JS plugins. */\nconst setAllPluginRules = (name: string, rules: Record<string, unknown>, severity: \"error\" | \"off\") =>\n Object.fromEntries(Object.keys(rules).map((rule) => [`${name}/${rule}`, severity] as const))\n\n// Type plugin rules with oxlint's generic `DummyRule` because its per-rule config types aren't exported, which breaks declaration emit.\ntype PluginRules = Record<string, DummyRule>\n\n/** A JS plugin and the slice of oxlint config that goes with it. Each one is merged into the base config. */\ninterface PluginPart extends Omit<OxlintConfig, \"jsPlugins\" | \"overrides\" | \"rules\"> {\n overrides?: (Omit<OxlintOverride, \"rules\"> & { rules?: PluginRules })[]\n rules?: PluginRules\n /** Loads the plugin only when true. Defaults to true. */\n enabled?: boolean\n package: string\n /** The plugin's rule definitions, used to set every rule to \"error\". The part's own `rules` then take precedence. */\n pluginRules: Record<string, unknown> | undefined\n}\n\nconst { dependencies, engines } = readProjectPackageJson()\nconst tailwindStylesheet = resolveProjectTailwind()\n\n// Key each part by the rule namespace its plugin registers.\nconst plugins: Record<string, PluginPart> = {\n bunisms: {\n overrides: [\n {\n excludeFiles: [\"src/**/__tests__/**\", \"src/**/*.test.{ts,tsx}\", \"src/**/test-setup.ts\", \"src/**/test-utils.ts\"],\n // Turn off Bun suggestions in Node runtime code. Tests and tooling still run on Bun.\n files: engines.has(\"node\") ? [\"src/**\"] : [],\n rules: setAllPluginRules(\"bunisms\", bunismsPlugin.rules, \"off\"),\n },\n ],\n package: \"eslint-plugin-bunisms\",\n pluginRules: bunismsPlugin.rules,\n rules: {\n \"bunisms/prefer-mock-restore-in-after-each\": \"off\", // `test-setup.ts` preloads restore mocks globally\n },\n },\n \"clean-modules\": {\n package: \"@adamhl8/eslint-plugin-clean-modules\",\n pluginRules: cleanModulesPlugin.rules,\n },\n \"directive-comments\": {\n package: \"oxlint-plugin-directive-comments\",\n pluginRules: directiveCommentsPluginRules,\n rules: {\n \"directive-comments/disable-enable-pair\": [\"error\", { allowWholeFile: true }],\n \"directive-comments/no-use\": \"off\", // bans every directive comment\n },\n },\n e18e: {\n package: \"@e18e/eslint-plugin\",\n pluginRules: e18ePlugin.rules,\n rules: {\n \"e18e/no-indexof-equality\": \"off\", // needs type information, which JS plugins don't get\n \"e18e/no-spread-in-reduce\": \"off\", // `oxc/no-accumulating-spread` covers this\n \"e18e/prefer-array-at\": \"off\", // `unicorn/prefer-at` covers this\n \"e18e/prefer-array-some\": \"off\", // `unicorn/prefer-array-some` covers this\n \"e18e/prefer-array-to-reversed\": \"off\", // `unicorn/no-array-reverse` covers this\n \"e18e/prefer-array-to-sorted\": \"off\", // `unicorn/no-array-sort` covers this\n \"e18e/prefer-date-now\": \"off\", // `unicorn/prefer-date-now` covers this\n \"e18e/prefer-exponentiation-operator\": \"off\", // `prefer-exponentiation-operator` covers this\n \"e18e/prefer-flatmap-over-map-flat\": \"off\", // `unicorn/prefer-array-flat-map` covers this\n \"e18e/prefer-includes\": \"off\", // `unicorn/prefer-includes` covers this\n \"e18e/prefer-nullish-coalescing\": \"off\", // `typescript/prefer-nullish-coalescing` covers this\n \"e18e/prefer-object-has-own\": \"off\", // `prefer-object-has-own` covers this\n \"e18e/prefer-slice-over-split-index\": \"off\",\n \"e18e/prefer-spread-syntax\": \"off\", // `unicorn/prefer-spread` and `prefer-object-spread` cover this\n },\n },\n hono: {\n enabled: dependencies.has(\"hono\"),\n package: \"eslint-plugin-hono\",\n pluginRules: honoPlugin.rules,\n rules: {\n \"hono/no-process-env\": \"off\", // tools and tests legitimately read the raw environment\n },\n },\n \"react-web-api\": {\n enabled: dependencies.has(\"react\"),\n package: \"eslint-plugin-react-web-api\",\n pluginRules: reactWebApiPlugin.rules,\n },\n \"react-you-might-not-need-an-effect\": {\n enabled: dependencies.has(\"react\"),\n package: \"eslint-plugin-react-you-might-not-need-an-effect\",\n pluginRules: reactEffectPlugin.rules,\n rules: {\n \"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-chain-state-updates\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-derived-state\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-initialize-state\": \"off\", // `react/set-state-in-effect` covers this\n \"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change\": \"off\", // `react/set-state-in-effect` covers this\n },\n },\n regexp: {\n package: \"eslint-plugin-regexp\",\n pluginRules: regexpPluginRules,\n rules: {\n \"regexp/letter-case\": [\"error\", { hexadecimalEscape: \"uppercase\", unicodeEscape: \"uppercase\" }], // match `unicorn/escape-case`\n \"regexp/no-control-character\": \"off\", // `no-control-regex` covers this\n \"regexp/no-empty-character-class\": \"off\", // `no-empty-character-class` covers this\n \"regexp/no-invalid-regexp\": \"off\", // `no-invalid-regexp` covers this\n \"regexp/no-super-linear-move\": \"off\",\n \"regexp/no-useless-escape\": \"off\", // `no-useless-escape` covers this\n \"regexp/prefer-named-capture-group\": \"off\", // `prefer-named-capture-group` covers this\n \"regexp/require-unicode-regexp\": \"off\", // `require-unicode-regexp` covers this\n \"regexp/require-unicode-sets-regexp\": \"off\", // `require-unicode-regexp` covers this\n \"regexp/sort-alternatives\": \"off\",\n },\n },\n tailwindcss: {\n // Load the Tailwind plugin only with a stylesheet because it reports every class string without one.\n enabled: Boolean(tailwindStylesheet),\n package: \"oxlint-tailwindcss\",\n pluginRules: tailwindcssPlugin.rules,\n rules: {\n \"tailwindcss/enforce-consistent-line-wrapping\": \"off\", // oxfmt handles line width\n \"tailwindcss/enforce-logical\": \"off\", // conflicts with `tailwindcss/enforce-physical`\n \"tailwindcss/enforce-sort-order\": \"off\", // oxfmt sorts classes\n \"tailwindcss/max-class-count\": \"off\",\n },\n // Keep `entryPoint` relative because the plugin resolves it against the directory of the project's oxlint config.\n settings: { tailwindcss: { entryPoint: tailwindStylesheet } },\n },\n}\n\nconst nativeConfig = {\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n\n categories: {\n correctness: \"error\",\n nursery: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n\n plugins: [\n \"eslint\",\n \"react\",\n \"unicorn\",\n \"typescript\",\n \"oxc\",\n \"import\",\n \"jsdoc\",\n \"vitest\",\n \"jsx-a11y\",\n \"react-perf\",\n \"promise\",\n \"node\",\n ],\n\n overrides: [\n {\n files: [\n \".release-it.ts\",\n \"astro.config.ts\",\n \"commitlint.config.ts\",\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \"prisma.config.ts\",\n \"tsdown.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n {\n files: [\"bask.ts\"],\n rules: {\n \"clean-modules/require-direct-exports\": \"off\",\n \"import/export\": \"off\",\n },\n },\n {\n files: [\".release-it.ts\"],\n rules: {\n \"no-template-curly-in-string\": \"off\",\n },\n },\n {\n files: [\"**/*.tsx\"],\n rules: {\n \"func-style\": [\"error\", \"declaration\", { allowArrowFunctions: true }],\n },\n },\n ],\n\n rules: {\n /* Modified rules */\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"function-declaration\", unnamedComponents: \"arrow-function\" },\n ],\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", propElementValues: \"always\", props: \"never\" }],\n\n \"unicorn/filename-case\": [\n \"error\",\n {\n cases: { kebabCase: true, pascalCase: true },\n },\n ],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n /* Disabled rules */\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"init-declarations\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-console\": \"off\",\n \"no-continue\": \"off\",\n \"no-duplicate-imports\": \"off\",\n \"no-inline-comments\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-plusplus\": \"off\",\n \"no-regex-spaces\": \"off\", // `regexp/prefer-quantifier` covers this\n \"no-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"no-void\": \"off\",\n \"one-var\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"off\",\n \"import/prefer-default-export\": \"off\",\n\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n\n \"node/callback-return\": \"off\",\n \"node/no-process-env\": \"off\", // tools and tests legitimately read the raw environment\n \"node/no-sync\": \"off\",\n \"node/no-top-level-await\": \"off\",\n\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n\n \"react/exhaustive-effect-dependencies\": \"off\", // `react/exhaustive-deps` covers this\n \"react/forbid-component-props\": \"off\",\n \"react/hooks\": \"off\", // `react/rules-of-hooks` covers this\n \"react/invariant\": \"off\",\n \"react/jsx-filename-extension\": \"off\",\n \"react/jsx-max-depth\": \"off\",\n \"react/jsx-no-literals\": \"off\",\n \"react/memo-dependencies\": \"off\", // `react/exhaustive-deps` covers this\n \"react/no-deriving-state-in-effects\": \"off\", // `react/set-state-in-effect` covers this\n \"react/react-in-jsx-scope\": \"off\",\n \"react/rule-suppression\": \"off\",\n \"react/todo\": \"off\",\n\n \"typescript/consistent-return\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n\n \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/no-await-expression-member\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n\n \"vitest/no-hooks\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-describe-function-title\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/prefer-importing-vitest-globals\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/require-hook\": \"off\", // reenable when false positives are fixed?\n \"vitest/require-test-timeout\": \"off\",\n },\n} as const satisfies OxlintConfig\n\nconst enabledPluginEntries = Object.entries(plugins).filter(([, plugin]) => plugin.enabled ?? true)\nconst enabledPlugins = enabledPluginEntries.map(([, plugin]) => plugin)\n// Resolve JS plugins to absolute paths so consumers load them from this package's own deps.\nconst resolvedPluginPackages = enabledPlugins.map((plugin) => resolvePackagePath(plugin.package))\nconst pluginOverrides = enabledPlugins.flatMap((plugin) => plugin.overrides ?? [])\nconst pluginSettings = Object.fromEntries(enabledPlugins.flatMap((plugin) => Object.entries(plugin.settings ?? {})))\n\n/** Lists a plugin's rules as entries */\nconst toPluginRuleEntries = ([name, { pluginRules = {}, rules }]: [string, PluginPart]) => {\n const defaultRules = setAllPluginRules(name, pluginRules, \"error\")\n const pluginRuleEntries = Object.entries({ ...defaultRules, ...rules })\n return pluginRuleEntries\n}\n\nconst resolvedPluginRules = Object.fromEntries(enabledPluginEntries.flatMap(toPluginRuleEntries))\n\nconst baseConfig = {\n ...nativeConfig,\n jsPlugins: resolvedPluginPackages,\n overrides: [...nativeConfig.overrides, ...pluginOverrides],\n rules: {\n ...resolvedPluginRules,\n ...nativeConfig.rules,\n },\n settings: pluginSettings,\n} satisfies OxlintConfig\n\nexport const oxlintConfig = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,qBAAqB,MAAc,OAAgC,aACvE,OAAO,YAAY,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,SAAS,CAAC,GAAG,KAAK,GAAG,QAAQ,QAAQ,CAAU,CAAC;AAgB7F,MAAM,EAAE,cAAc,YAAY,uBAAuB;AACzD,MAAM,qBAAqB,uBAAuB;AAGlD,MAAM,UAAsC;CAC1C,SAAS;EACP,WAAW,CACT;GACE,cAAc;IAAC;IAAuB;IAA0B;IAAwB;GAAsB;GAE9G,OAAO,QAAQ,IAAI,MAAM,IAAI,CAAC,QAAQ,IAAI,CAAC;GAC3C,OAAO,kBAAkB,WAAW,cAAc,OAAO,KAAK;EAChE,CACF;EACA,SAAS;EACT,aAAa,cAAc;EAC3B,OAAO,EACL,6CAA6C,MAC/C;CACF;CACA,iBAAiB;EACf,SAAS;EACT,aAAa,mBAAmB;CAClC;CACA,sBAAsB;EACpB,SAAS;EACT,aAAaA;EACb,OAAO;GACL,0CAA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D0B,OAAO,QAAQ;EAAE,GAAG;EAAc,GAAG;CAAM,CAC9C;AACzB;AAEA,MAAM,sBAAsB,OAAO,YAAY,qBAAqB,QAAQ,mBAAmB,CAAC;AAEhG,MAAM,aAAa;CACjB,GAAG;CACH,WAAW;CACX,WAAW,CAAC,GAAG,aAAa,WAAW,GAAG,eAAe;CACzD,OAAO;EACL,GAAG;EACH,GAAG,aAAa;CAClB;CACA,UAAU;AACZ;AAEA,MAAa,eAAe,oBAAqD,UAAU"}
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { Config } from "release-it";
3
- //#region src/configs/release-it.base.d.ts
4
3
  type PluginHooks = Partial<Record<`${"before" | "after"}:${string}`, string | string[]>>;
5
4
  type ReleaseItConfig = Config & {
6
5
  hooks?: PluginHooks;
@@ -32,6 +31,5 @@ export declare const releaseItConfig: OptionalMergeConfigFn<ReleaseItConfig, {
32
31
  readonly publishArgs: ["--ignore-scripts"];
33
32
  };
34
33
  }>;
35
- //#endregion
36
34
  export {};
37
35
  //# sourceMappingURL=release-it.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-it.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/release-it.base.ts"],"mappings":";;;KAOK,cAAc,QAAQ;KACtB,kBAAkB;EAAW,QAAQ;;qBA+B7B,iBAAeA,sBAAA;;aA3BxB;aACA;;;aAGA;eACE;eACA;;;;aAIF;aAEA;aACA;aACA;;;aAGA;aACA;;;aAGA;aACA;aACA"}
1
+ {"version":3,"file":"release-it.base.d.ts","names":["_$_merge_config_merge_config_ts0.OptionalMergeConfigFn"],"sources":["../../src/configs/release-it.base.ts"],"mappings":";;KAOK,cAAc,QAAQ;KACtB,kBAAkB;EAAW,QAAQ;;qBA+B7B,iBAAeA,sBAAA;;aA3BxB;aACA;;;aAGA;eACE;eACA;;;;aAIF;aAEA;aACA;aACA;;;aAGA;aACA;;;aAGA;aACA;aACA"}
@@ -1,6 +1,6 @@
1
1
  import { createMergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { configFilePath } from "../utils.js";
3
- //#region src/configs/release-it.base.ts
3
+ // src/configs/release-it.base.ts
4
4
  const baseConfig = {
5
5
  hooks: {
6
6
  "before:init": "bunx bask build",
@@ -27,7 +27,6 @@ const baseConfig = {
27
27
  }
28
28
  };
29
29
  const releaseItConfig = createMergeConfigFn(baseConfig);
30
- //#endregion
31
30
  export { releaseItConfig };
32
31
 
33
32
  //# sourceMappingURL=release-it.base.js.map
@@ -17,6 +17,8 @@
17
17
  "checkJs": true,
18
18
  "skipLibCheck": true,
19
19
  "noEmit": true,
20
+ "declaration": true,
21
+ "declarationMap": true,
20
22
 
21
23
  "allowUnreachableCode": false,
22
24
  "allowUnusedLabels": false,
@@ -1,7 +1,6 @@
1
1
  import { MergeConfigFn } from "../merge-config/merge-config.js";
2
2
  import { SetRequired } from "type-fest";
3
3
  import { UserConfig } from "tsdown";
4
- //#region src/configs/tsdown.base.d.ts
5
4
  type StrictConfig = SetRequired<UserConfig, "platform">;
6
5
  declare const baseConfig: {
7
6
  readonly entry: ["./src/index.ts"];
@@ -14,8 +13,6 @@ declare const baseConfig: {
14
13
  readonly hash: false;
15
14
  readonly dts: {
16
15
  readonly generator: "tsgo";
17
- readonly newContext: true;
18
- readonly sourcemap: true;
19
16
  };
20
17
  readonly deps: {
21
18
  readonly neverBundle: ["bun"];
@@ -26,7 +23,7 @@ declare const baseConfig: {
26
23
  };
27
24
  readonly publint: true;
28
25
  readonly failOnWarn: true;
29
- readonly suppressWarnings: ["does not yet have a stable API"];
26
+ readonly suppressWarnings: ["TypeScript Go is experimental"];
30
27
  };
31
28
  type StrictBundleConfig = SetRequired<UserConfig, "platform" | "entry">;
32
29
  declare const bundleConfig: {
@@ -39,7 +36,7 @@ declare const bundleConfig: {
39
36
  readonly neverBundle: ["bun"];
40
37
  };
41
38
  readonly failOnWarn: true;
42
- readonly suppressWarnings: ["does not yet have a stable API"];
39
+ readonly suppressWarnings: ["TypeScript Go is experimental"];
43
40
  readonly entry: [];
44
41
  readonly unbundle: false;
45
42
  readonly sourcemap: false;
@@ -62,7 +59,7 @@ declare const binConfig: {
62
59
  readonly neverBundle: ["bun"];
63
60
  };
64
61
  readonly failOnWarn: true;
65
- readonly suppressWarnings: ["does not yet have a stable API"];
62
+ readonly suppressWarnings: ["TypeScript Go is experimental"];
66
63
  readonly entry: [];
67
64
  readonly unbundle: false;
68
65
  readonly sourcemap: false;
@@ -82,6 +79,5 @@ declare const binConfig: {
82
79
  export declare const tsdownConfig: MergeConfigFn<StrictConfig, typeof baseConfig>;
83
80
  export declare const tsdownBundleConfig: MergeConfigFn<StrictBundleConfig, typeof bundleConfig>;
84
81
  export declare const tsdownBinConfig: MergeConfigFn<StrictBinConfig, typeof binConfig>;
85
- //#endregion
86
82
  export {};
87
83
  //# sourceMappingURL=tsdown.base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;;KAOK,eAAe,YAAY;cAE1B;;WAEM;;;;WAIF;;;;aAIN;aACA;aACA;;;aAGA;;;aAGA;aACA;;;;;;KAQC,qBAAqB,YAAY;cAGhC;WA5BM;;WAIF;;;;aASN;;;;;;;;;;;aAwBA;eACE;;;;KAMD,kBAAkB,YAAY;cAG7B;;WA3CI;;;;aASN;;;;;;;;;;;aAwBA;eACE;;;WAWM;;aACkB;;;qBAKjB,cAAc,cAAc,qBAAqB;qBAKjD,oBAAoB,cAAc,2BAA2B;qBAK7D,iBAAiB,cAAc,wBAAwB"}
1
+ {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;KAOK,eAAe,YAAY;cAE1B;;WAEM;;;;WAIF;;;;aAIN;;;aAGA;;;aAGA;aACA;;;;;;KAQC,qBAAqB,YAAY;cAGhC;WA1BM;;WAIF;;;;aAON;;;;;;;;;;;aAwBA;eACE;;;;KAMD,kBAAkB,YAAY;cAG7B;;WAzCI;;;;aAON;;;;;;;;;;;aAwBA;eACE;;;WAWM;;aACkB;;;qBAKjB,cAAc,cAAc,qBAAqB;qBAKjD,oBAAoB,cAAc,2BAA2B;qBAK7D,iBAAiB,cAAc,wBAAwB"}
@@ -1,5 +1,5 @@
1
1
  import { createMergeConfigFn } from "../merge-config/merge-config.js";
2
- //#region src/configs/tsdown.base.ts
2
+ // src/configs/tsdown.base.ts
3
3
  const baseConfig = {
4
4
  entry: ["./src/index.ts"],
5
5
  platform: "neutral",
@@ -9,11 +9,7 @@ const baseConfig = {
9
9
  minify: "dce-only",
10
10
  fixedExtension: false,
11
11
  hash: false,
12
- dts: {
13
- generator: "tsgo",
14
- newContext: true,
15
- sourcemap: true
16
- },
12
+ dts: { generator: "tsgo" },
17
13
  deps: { neverBundle: ["bun"] },
18
14
  attw: {
19
15
  level: "error",
@@ -21,7 +17,7 @@ const baseConfig = {
21
17
  },
22
18
  publint: true,
23
19
  failOnWarn: true,
24
- suppressWarnings: ["does not yet have a stable API"]
20
+ suppressWarnings: ["TypeScript Go is experimental"]
25
21
  };
26
22
  const bundleConfig = {
27
23
  ...baseConfig,
@@ -41,7 +37,6 @@ const binConfig = {
41
37
  const tsdownConfig = createMergeConfigFn(baseConfig);
42
38
  const tsdownBundleConfig = createMergeConfigFn(bundleConfig);
43
39
  const tsdownBinConfig = createMergeConfigFn(binConfig);
44
- //#endregion
45
40
  export { tsdownBinConfig, tsdownBundleConfig, tsdownConfig };
46
41
 
47
42
  //# sourceMappingURL=tsdown.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.base.js","names":[],"sources":["../../src/configs/tsdown.base.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\nimport type { SetRequired } from \"type-fest\"\n\nimport type { MergeConfigFn } from \"#merge-config/merge-config.ts\"\nimport { createMergeConfigFn } from \"#merge-config/merge-config.ts\"\n\n// Force projects to specify platform\ntype StrictConfig = SetRequired<UserConfig, \"platform\">\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n platform: \"neutral\",\n target: false,\n unbundle: true,\n sourcemap: true,\n minify: \"dce-only\",\n fixedExtension: false,\n hash: false,\n dts: {\n generator: \"tsgo\",\n newContext: true,\n sourcemap: true,\n },\n deps: {\n neverBundle: [\"bun\"],\n },\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n publint: true,\n failOnWarn: true,\n suppressWarnings: [\"does not yet have a stable API\"],\n} as const satisfies StrictConfig\n\n// Force projects to specify platform and entry\ntype StrictBundleConfig = SetRequired<UserConfig, \"platform\" | \"entry\">\n\n// Single-file bundle (not a published library): bundle everything, drop types/lint/sourcemap.\nconst bundleConfig = {\n ...baseConfig,\n entry: [],\n unbundle: false,\n sourcemap: false,\n dts: false,\n attw: false,\n publint: false,\n inputOptions: {\n experimental: {\n attachDebugInfo: \"none\", // remove region comments from bundled output\n },\n },\n} as const satisfies StrictBundleConfig\n\n// Force projects to specify platform and entry\ntype StrictBinConfig = SetRequired<UserConfig, \"entry\">\n\n// A bin is a node bundle with no output file extension.\nconst binConfig = {\n ...bundleConfig,\n platform: \"node\",\n outExtensions: () => ({ js: \"\" }) as const,\n} as const satisfies StrictBinConfig\n\n// The export annotations forbid the no-arg call (platform/entry must be provided) and are load-bearing for\n// declaration emit: without one, tsgo synthesizes the type and fails with TS2883 on tsdown's non-exported internals.\nexport const tsdownConfig: MergeConfigFn<StrictConfig, typeof baseConfig> = createMergeConfigFn<\n StrictConfig,\n typeof baseConfig\n>(baseConfig)\n\nexport const tsdownBundleConfig: MergeConfigFn<StrictBundleConfig, typeof bundleConfig> = createMergeConfigFn<\n StrictBundleConfig,\n typeof bundleConfig\n>(bundleConfig)\n\nexport const tsdownBinConfig: MergeConfigFn<StrictBinConfig, typeof binConfig> = createMergeConfigFn<\n StrictBinConfig,\n typeof binConfig\n>(binConfig)\n"],"mappings":";;AASA,MAAM,aAAa;CACjB,OAAO,CAAC,gBAAgB;CACxB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,MAAM;CACN,KAAK;EACH,WAAW;EACX,YAAY;EACZ,WAAW;CACb;CACA,MAAM,EACJ,aAAa,CAAC,KAAK,EACrB;CACA,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,SAAS;CACT,YAAY;CACZ,kBAAkB,CAAC,gCAAgC;AACrD;AAMA,MAAM,eAAe;CACnB,GAAG;CACH,OAAO,CAAC;CACR,UAAU;CACV,WAAW;CACX,KAAK;CACL,MAAM;CACN,SAAS;CACT,cAAc,EACZ,cAAc,EACZ,iBAAiB,OACnB,EACF;AACF;AAMA,MAAM,YAAY;CAChB,GAAG;CACH,UAAU;CACV,sBAAsB,EAAE,IAAI,GAAG;AACjC;AAIA,MAAa,eAA+D,oBAG1E,UAAU;AAEZ,MAAa,qBAA6E,oBAGxF,YAAY;AAEd,MAAa,kBAAoE,oBAG/E,SAAS"}
1
+ {"version":3,"file":"tsdown.base.js","names":[],"sources":["../../src/configs/tsdown.base.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\nimport type { SetRequired } from \"type-fest\"\n\nimport type { MergeConfigFn } from \"#merge-config/merge-config.ts\"\nimport { createMergeConfigFn } from \"#merge-config/merge-config.ts\"\n\n// Force projects to specify platform\ntype StrictConfig = SetRequired<UserConfig, \"platform\">\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n platform: \"neutral\",\n target: false,\n unbundle: true,\n sourcemap: true,\n minify: \"dce-only\",\n fixedExtension: false,\n hash: false,\n dts: {\n generator: \"tsgo\",\n },\n deps: {\n neverBundle: [\"bun\"],\n },\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n publint: true,\n failOnWarn: true,\n suppressWarnings: [\"TypeScript Go is experimental\"],\n} as const satisfies StrictConfig\n\n// Force projects to specify platform and entry\ntype StrictBundleConfig = SetRequired<UserConfig, \"platform\" | \"entry\">\n\n// Single-file bundle (not a published library): bundle everything, drop types/lint/sourcemap.\nconst bundleConfig = {\n ...baseConfig,\n entry: [],\n unbundle: false,\n sourcemap: false,\n dts: false,\n attw: false,\n publint: false,\n inputOptions: {\n experimental: {\n attachDebugInfo: \"none\", // remove region comments from bundled output\n },\n },\n} as const satisfies StrictBundleConfig\n\n// Force projects to specify platform and entry\ntype StrictBinConfig = SetRequired<UserConfig, \"entry\">\n\n// A bin is a node bundle with no output file extension.\nconst binConfig = {\n ...bundleConfig,\n platform: \"node\",\n outExtensions: () => ({ js: \"\" }) as const,\n} as const satisfies StrictBinConfig\n\n// The export annotations forbid the no-arg call (platform/entry must be provided) and are load-bearing for\n// declaration emit: without one, tsgo synthesizes the type and fails with TS2883 on tsdown's non-exported internals.\nexport const tsdownConfig: MergeConfigFn<StrictConfig, typeof baseConfig> = createMergeConfigFn<\n StrictConfig,\n typeof baseConfig\n>(baseConfig)\n\nexport const tsdownBundleConfig: MergeConfigFn<StrictBundleConfig, typeof bundleConfig> = createMergeConfigFn<\n StrictBundleConfig,\n typeof bundleConfig\n>(bundleConfig)\n\nexport const tsdownBinConfig: MergeConfigFn<StrictBinConfig, typeof binConfig> = createMergeConfigFn<\n StrictBinConfig,\n typeof binConfig\n>(binConfig)\n"],"mappings":";;AASA,MAAM,aAAa;CACjB,OAAO,CAAC,gBAAgB;CACxB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,MAAM;CACN,KAAK,EACH,WAAW,OACb;CACA,MAAM,EACJ,aAAa,CAAC,KAAK,EACrB;CACA,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,SAAS;CACT,YAAY;CACZ,kBAAkB,CAAC,+BAA+B;AACpD;AAMA,MAAM,eAAe;CACnB,GAAG;CACH,OAAO,CAAC;CACR,UAAU;CACV,WAAW;CACX,KAAK;CACL,MAAM;CACN,SAAS;CACT,cAAc,EACZ,cAAc,EACZ,iBAAiB,OACnB,EACF;AACF;AAMA,MAAM,YAAY;CAChB,GAAG;CACH,UAAU;CACV,sBAAsB,EAAE,IAAI,GAAG;AACjC;AAIA,MAAa,eAA+D,oBAG1E,UAAU;AAEZ,MAAa,qBAA6E,oBAGxF,YAAY;AAEd,MAAa,kBAAoE,oBAG/E,SAAS"}
@@ -1,8 +1,6 @@
1
1
  import { requireWhen } from "./utils.js";
2
2
  import arkenv from "arkenv";
3
- //#region src/env/index.d.ts
4
3
  type ArkEnv = typeof arkenv;
5
4
  export declare const parseEnv: ArkEnv;
6
- //#endregion
7
5
  export { requireWhen };
8
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/env/index.ts"],"mappings":";;;KAKK,gBAAgB;qBAER,UAOP"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/env/index.ts"],"mappings":";;KAKK,gBAAgB;qBAER,UAOP"}
package/dist/env/index.js CHANGED
@@ -2,7 +2,7 @@ import { requireWhen } from "./utils.js";
2
2
  import process from "node:process";
3
3
  import arkenv from "arkenv";
4
4
  import { attempt, isErr } from "ts-explicit-errors";
5
- //#region src/env/index.ts
5
+ // src/env/index.ts
6
6
  const parseEnv = ((...args) => {
7
7
  const env = attempt(() => arkenv(...args));
8
8
  if (isErr(env)) {
@@ -11,7 +11,6 @@ const parseEnv = ((...args) => {
11
11
  }
12
12
  return env;
13
13
  });
14
- //#endregion
15
14
  export { parseEnv, requireWhen };
16
15
 
17
16
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,4 @@
1
1
  import { type } from "arktype";
2
- //#region src/env/utils.d.ts
3
2
  /**
4
3
  * Makes an env var required while `when` is true, otherwise optional.
5
4
  *
@@ -8,5 +7,4 @@ import { type } from "arktype";
8
7
  */
9
8
  export declare function requireWhen<const def>(when: boolean, type: type.validate<def>): ReturnType<type.instantiate<def>["optional"]>;
10
9
  export declare function requireWhen<const def>(when: boolean, type: type.validate<def>, fallback: type.infer<def>): type.instantiate<def>;
11
- //#endregion
12
10
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":["arktype"],"sources":["../../src/env/utils.ts"],"mappings":";;;;;;;;wBASgB,kBAAkB,KAChC,eACA,MAAMA,KAAQ,SAAS,OACtB,WAAWA,KAAQ,YAAY;wBAClB,kBAAkB,KAChC,eACA,MAAMA,KAAQ,SAAS,MACvB,UAAUA,KAAQ,MAAM,OACvBA,KAAQ,YAAY"}
1
+ {"version":3,"file":"utils.d.ts","names":["arktype"],"sources":["../../src/env/utils.ts"],"mappings":";;;;;;;wBASgB,kBAAkB,KAChC,eACA,MAAMA,KAAQ,SAAS,OACtB,WAAWA,KAAQ,YAAY;wBAClB,kBAAkB,KAChC,eACA,MAAMA,KAAQ,SAAS,MACvB,UAAUA,KAAQ,MAAM,OACvBA,KAAQ,YAAY"}
package/dist/env/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type } from "arkenv";
2
- //#region src/env/utils.ts
2
+ // src/env/utils.ts
3
3
  function requireWhen(when, type$1, ...rest) {
4
4
  const t = type.raw(type$1);
5
5
  if (when) return t;
@@ -8,7 +8,6 @@ function requireWhen(when, type$1, ...rest) {
8
8
  const unset = Symbol("unset");
9
9
  return t.or(type.unit(unset)).pipe((v) => v === unset ? fallback : v).default(unset);
10
10
  }
11
- //#endregion
12
11
  export { requireWhen };
13
12
 
14
13
  //# sourceMappingURL=utils.js.map
@@ -1,6 +1,5 @@
1
1
  import { Clean, MergedConfig } from "./merge.types.js";
2
2
  import { ReadonlyDeep } from "type-fest";
3
- //#region src/merge-config/merge-config.d.ts
4
3
  /**
5
4
  * The merge config function. `userConfig` is deep merged into `BaseConfig` with arrays appended to the base array. The
6
5
  * optional `replaceConfig` is then deep merged into that result with arrays used as-is, so putting an array there
@@ -14,5 +13,4 @@ import { ReadonlyDeep } from "type-fest";
14
13
  export type MergeConfigFn<UserConfig, BaseConfig> = (<const UserConfigToMerge extends ReadonlyDeep<UserConfig>>(userConfig: UserConfigToMerge) => MergedConfig<BaseConfig, UserConfigToMerge>) & (<const UserConfigToMerge extends ReadonlyDeep<UserConfig>, const ReplaceConfigToMerge extends ReadonlyDeep<Partial<UserConfig>>>(userConfig: UserConfigToMerge, replaceConfig: ReplaceConfigToMerge) => MergedConfig<MergedConfig<BaseConfig, UserConfigToMerge>, ReplaceConfigToMerge, "replace">);
15
14
  /** A MergeConfigFn that can also be called with no arguments, returning a writable clone of the base config. */
16
15
  export type OptionalMergeConfigFn<UserConfig, BaseConfig> = MergeConfigFn<UserConfig, BaseConfig> & (() => Clean<BaseConfig>);
17
- //#endregion
18
16
  //# sourceMappingURL=merge-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-config.d.ts","names":[],"sources":["../../src/merge-config/merge-config.ts"],"mappings":";;;;;;;;;;;;;YAgCY,cAAc,YAAY,sBAAsB,0BAA0B,aAAa,aACjG,YAAY,sBACT,aAAa,YAAY,8BAEpB,0BAA0B,aAAa,mBACvC,6BAA6B,aAAa,QAAQ,cAExD,YAAY,mBACZ,eAAe,yBACZ,aAAa,aAAa,YAAY,oBAAoB;;YAGrD,sBAAsB,YAAY,cAAc,cAAc,YAAY,qBAC3E,MAAM"}
1
+ {"version":3,"file":"merge-config.d.ts","names":[],"sources":["../../src/merge-config/merge-config.ts"],"mappings":";;;;;;;;;;;;YAgCY,cAAc,YAAY,sBAAsB,0BAA0B,aAAa,aACjG,YAAY,sBACT,aAAa,YAAY,8BAEpB,0BAA0B,aAAa,mBACvC,6BAA6B,aAAa,QAAQ,cAExD,YAAY,mBACZ,eAAe,yBACZ,aAAa,aAAa,YAAY,oBAAoB;;YAGrD,sBAAsB,YAAY,cAAc,cAAc,YAAY,qBAC3E,MAAM"}
@@ -1,5 +1,5 @@
1
1
  import { cloneDeep, mergeWith } from "es-toolkit";
2
- //#region src/merge-config/merge-config.ts
2
+ // src/merge-config/merge-config.ts
3
3
  /**
4
4
  * The runtime counterpart of MergedConfig in merge.types.ts: a deep merge whose customizer applies the array mode. The
5
5
  * source is pre-cloned so the result never aliases the caller's objects. The merge visits string keys only, so
@@ -24,7 +24,6 @@ const createMergeConfigFn = (baseConfig) => {
24
24
  };
25
25
  return mergeConfigFn;
26
26
  };
27
- //#endregion
28
27
  export { createMergeConfigFn };
29
28
 
30
29
  //# sourceMappingURL=merge-config.js.map
@@ -1,4 +1,3 @@
1
- //#region src/merge-config/merge.types.d.ts
2
1
  type AnyFunction = (...args: never[]) => unknown;
3
2
  /** How user arrays combine with base arrays: appended in spread mode, used as-is in replace mode. */
4
3
  export type Mode = "spread" | "replace";
@@ -46,6 +45,5 @@ type MergeObjects<BaseConfig, UserConfig, Depth extends readonly unknown[], M ex
46
45
  * arrays show only the user's elements.
47
46
  */
48
47
  export type MergedConfig<BaseConfig, UserConfig, M extends Mode = "spread"> = MergeObjects<BaseConfig, UserConfig, MaxDepth, M>;
49
- //#endregion
50
48
  export {};
51
49
  //# sourceMappingURL=merge.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge.types.d.ts","names":[],"sources":["../../src/merge-config/merge.types.ts"],"mappings":";KAWK,kBAAkB;;YAGX;;;;;;KAOP;;;;;;KAOA,eAAe,cAAc,OAAO,SAAS;YAAoB,OAAO;;;;;;;;YAQjE,MAAM,GAAG,mCAAmC,YAAY,mBAChE,0CAA0C,kBACxC,UAAU,eACR,iBACa,WAAW,IAAI,MAAM,EAAE,IAAI,qBAC1C,IACF;;;;;KAMC,YACH,WACA,sCACA,kCACA,UAAU,QACR,qBACA,wCACG,MAAM,mBAAmB,SAAS,MAAM,mBAAmB,YAC5D,MAAM,WAAW,SACnB,MAAM,WAAW;;;;;KAMhB,YAAY,WAAW,WAAW,kCAAkC,UAAU,QAAQ,2BACvF,uCACE,YAAY,WAAW,WAAW,OAAO,KACzC,kBAAkB,eAChB,YACA,uCAAuC,eACrC,MAAM,WAAW,SACjB,2BACE,aAAa,WAAW,WAAW,OAAO,KAC1C,MAAM,WAAW,SACzB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W,IAAI,WAAW,IAAI,gBAAgB,KAC5D,MAAM,WAAW,IAAI,kCAEd,WAAW,cAAc,gBAAgB,8BAA8B,IAAI,MACpF,WAAW,IACX,kCAEY,aACX,WAAW,SAAS,OAAO,gBAEhC;;;;;YAMQ,aAAa,YAAY,YAAY,UAAU,mBAAmB,aAC5E,YACA,YACA,UACA"}
package/dist/utils.js CHANGED
@@ -2,7 +2,7 @@ import { existsSync, globSync, readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { isPlainObject } from "es-toolkit/predicate";
5
- //#region src/utils.ts
5
+ // src/utils.ts
6
6
  const CONFIG_DIRS = ["./configs/", "../configs/"];
7
7
  /** Returns the absolute path of a file in this package's `configs` folder. */
8
8
  const configFilePath = (name) => {
@@ -40,7 +40,6 @@ const resolveProjectTailwind = () => {
40
40
  if (!dependencies.has("tailwindcss")) return false;
41
41
  return globSync("**/*.{css,scss,sass,less,pcss}", { exclude: (filePath) => ["node_modules", ".git"].includes(path.basename(filePath)) }).toSorted().find((file) => TAILWIND_IMPORT.test(readFileSync(file, "utf8"))) ?? false;
42
42
  };
43
- //#endregion
44
43
  export { configFilePath, readProjectPackageJson, resolvePackagePath, resolveProjectTailwind };
45
44
 
46
45
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "My shared configs for TS projects",
5
5
  "homepage": "https://github.com/adamhl8/configs",
6
6
  "bugs": {
@@ -46,7 +46,7 @@
46
46
  "access": "public"
47
47
  },
48
48
  "scripts": {
49
- "prepare": "bunx bask prepare"
49
+ "prepare": "bask prepare"
50
50
  },
51
51
  "dependencies": {
52
52
  "@adamhl8/eslint-plugin-clean-modules": "^0.1.5",
@@ -55,10 +55,10 @@
55
55
  "@e18e/eslint-plugin": "^0.8.1",
56
56
  "arkenv": "^0.12.3",
57
57
  "arktype": "^2.2.9",
58
- "es-toolkit": "^1.52.0",
58
+ "es-toolkit": "^1.53.0",
59
59
  "eslint-plugin-bunisms": "^0.11.0",
60
60
  "eslint-plugin-hono": "^1.1.0",
61
- "eslint-plugin-react-web-api": "^5.28.7",
61
+ "eslint-plugin-react-web-api": "^5.28.8",
62
62
  "eslint-plugin-react-you-might-not-need-an-effect": "^1.0.2",
63
63
  "eslint-plugin-regexp": "^3.3.1",
64
64
  "oxlint-plugin-directive-comments": "^0.1.0",
@@ -71,35 +71,35 @@
71
71
  "@adamhl8/configs": "file:.",
72
72
  "@arethetypeswrong/core": "^0.18.5",
73
73
  "@commitlint/cli": "^21.2.4",
74
- "@types/bun": "^1.4.3",
75
- "knip": "^6.42.1",
74
+ "@types/bun": "^1.4.4",
75
+ "knip": "^6.43.0",
76
76
  "markdown-toc": "^1.2.0",
77
77
  "oxfmt": "^0.74.0",
78
78
  "oxlint": "^1.89.0",
79
- "oxlint-tsgolint": "^7.0.2004",
79
+ "oxlint-tsgolint": "^7.0.2005",
80
80
  "publint": "^0.3.25",
81
81
  "release-it": "^21.1.1",
82
82
  "release-it-git-cliff": "^0.2.0",
83
- "tsdown": "^0.23.1",
84
- "typescript": "^7.0.2"
83
+ "tsdown": "^0.23.2",
84
+ "typescript": "7.1.0-beta"
85
85
  },
86
86
  "peerDependencies": {
87
- "@adamhl8/bask": ">=0.3",
88
- "@arethetypeswrong/core": ">=0.18.1",
89
- "@commitlint/cli": ">=21",
90
- "@commitlint/config-conventional": ">=21",
91
- "@tailwindcss/language-server": ">=0.14",
92
- "knip": ">=6",
93
- "markdown-toc": ">=1",
94
- "oxfmt": ">=0.73",
95
- "oxlint": ">=1.79",
96
- "oxlint-tsgolint": ">=7.0.2004",
97
- "publint": ">=0.3.8",
87
+ "@adamhl8/bask": ">=0.5",
88
+ "@arethetypeswrong/core": ">=0.18",
89
+ "@commitlint/cli": ">=21.2",
90
+ "@commitlint/config-conventional": ">=21.2",
91
+ "@tailwindcss/language-server": ">=0.16",
92
+ "knip": ">=6.43",
93
+ "markdown-toc": ">=1.2",
94
+ "oxfmt": ">=0.74",
95
+ "oxlint": ">=1.89",
96
+ "oxlint-tsgolint": ">=7.0.2005",
97
+ "publint": ">=0.3",
98
98
  "release-it": ">=21.1",
99
- "release-it-git-cliff": ">=0.1",
99
+ "release-it-git-cliff": ">=0.2",
100
100
  "tailwint": ">=1.1",
101
- "tsdown": ">=0.22.7",
102
- "typescript": "^7.0.0"
101
+ "tsdown": ">=0.23.2",
102
+ "typescript": "^7.1.0-beta"
103
103
  },
104
104
  "peerDependenciesMeta": {
105
105
  "@arethetypeswrong/core": {