@adamhl8/configs 0.26.0 → 0.27.0

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.
@@ -36,12 +36,13 @@ body = """
36
36
  [git]
37
37
  commit_parsers = [
38
38
  { message = "^feat", group = "<!-- 0 -->🚀 Features" },
39
- { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
39
+ { message = "^improve", group = "<!-- 1 -->✨ Improvements" },
40
40
  { message = "^perf", group = "<!-- 2 -->⚡ Performance" },
41
- { message = "^refactor", group = "<!-- 3 -->🚜 Refactor" },
42
- { message = "^chore|^ci", group = "<!-- 4 -->⚙️ Miscellaneous Tasks" },
43
- { message = "^doc", group = "<!-- 5 -->📚 Documentation" },
44
- { message = "^revert", group = "<!-- 6 -->◀️ Revert" },
41
+ { message = "^fix", group = "<!-- 3 -->🐛 Bug Fixes" },
42
+ { message = "^refactor", group = "<!-- 4 -->🚜 Refactor" },
43
+ { message = "^chore|^ci", group = "<!-- 5 -->⚙️ Miscellaneous Tasks" },
44
+ { message = "^docs", group = "<!-- 6 -->📚 Documentation" },
45
+ { message = "^revert", group = "<!-- 7 -->◀️ Revert" },
45
46
  { message = "^release", skip = true },
46
47
  ]
47
48
 
@@ -49,3 +50,7 @@ commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }]
49
50
 
50
51
  filter_commits = true
51
52
  sort_commits = "newest"
53
+
54
+ [bump]
55
+ no_increment_regex = "^chore|^ci|^docs"
56
+ custom_minor_increment_regex = "^improve"
@@ -8,7 +8,11 @@ const EXCLUDED_TYPES = /* @__PURE__ */ new Set([
8
8
  "style",
9
9
  "build"
10
10
  ]);
11
- const commitTypes = [...conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type)), "release"];
11
+ const commitTypes = [
12
+ ...conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type)),
13
+ "improve",
14
+ "release"
15
+ ];
12
16
  const commitlintConfig = createMergeConfigFn({
13
17
  extends: ["@commitlint/config-conventional"],
14
18
  rules: { "type-enum": [
@@ -1 +1 @@
1
- {"version":3,"file":"commitlint.base.js","names":[],"sources":["../../src/configs/commitlint.base.ts"],"sourcesContent":["import conventional from \"@commitlint/config-conventional\"\nimport { RuleConfigSeverity } from \"@commitlint/types\"\nimport type { UserConfig } from \"@commitlint/types\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst [_severity, _condition, conventionalTypes] = conventional.rules[\"type-enum\"]\n\nconst EXCLUDED_TYPES = new Set([\"test\", \"style\", \"build\"])\nconst filteredTypes = conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type))\nconst commitTypes = [...filteredTypes, \"release\"]\n\nconst baseConfig = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"type-enum\": [RuleConfigSeverity.Error, \"always\", commitTypes],\n },\n} as const satisfies UserConfig\n\nexport const commitlintConfig = createMergeConfigFn<UserConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;AAMA,MAAM,CAAC,WAAW,YAAY,qBAAqB,aAAa,MAAM;AAEtE,MAAM,iCAAiB,IAAI,IAAI;CAAC;CAAQ;CAAS;AAAO,CAAC;AAEzD,MAAM,cAAc,CAAC,GADC,kBAAkB,QAAQ,SAAS,CAAC,eAAe,IAAI,IAAI,CAC7C,GAAG,SAAS;AAShD,MAAa,mBAAmB,oBAAmD;CANjF,SAAS,CAAC,iCAAiC;CAC3C,OAAO,EACL,aAAa;EAAC,mBAAmB;EAAO;EAAU;CAAW,EAC/D;AAGiF,CAAU"}
1
+ {"version":3,"file":"commitlint.base.js","names":[],"sources":["../../src/configs/commitlint.base.ts"],"sourcesContent":["import conventional from \"@commitlint/config-conventional\"\nimport { RuleConfigSeverity } from \"@commitlint/types\"\nimport type { UserConfig } from \"@commitlint/types\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst [_severity, _condition, conventionalTypes] = conventional.rules[\"type-enum\"]\n\nconst EXCLUDED_TYPES = new Set([\"test\", \"style\", \"build\"])\nconst filteredTypes = conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type))\nconst commitTypes = [...filteredTypes, \"improve\", \"release\"]\n\nconst baseConfig = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"type-enum\": [RuleConfigSeverity.Error, \"always\", commitTypes],\n },\n} as const satisfies UserConfig\n\nexport const commitlintConfig = createMergeConfigFn<UserConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;AAMA,MAAM,CAAC,WAAW,YAAY,qBAAqB,aAAa,MAAM;AAEtE,MAAM,iCAAiB,IAAI,IAAI;CAAC;CAAQ;CAAS;AAAO,CAAC;AAEzD,MAAM,cAAc;CAAC,GADC,kBAAkB,QAAQ,SAAS,CAAC,eAAe,IAAI,IAAI,CAC7C;CAAG;CAAW;AAAS;AAS3D,MAAa,mBAAmB,oBAAmD;CANjF,SAAS,CAAC,iCAAiC;CAC3C,OAAO,EACL,aAAa;EAAC,mBAAmB;EAAO;EAAU;CAAW,EAC/D;AAGiF,CAAU"}
@@ -3,11 +3,9 @@ import { KnipConfig } from "knip";
3
3
 
4
4
  //#region src/configs/knip.base.d.ts
5
5
  declare const knipConfig: OptionalMergeConfigFn<KnipConfig, {
6
- readonly project: ["**"];
7
- readonly entry: ["./src/index.ts", "**/*.test.ts", "./tsdown.config.ts"];
6
+ readonly project: ["**/*"];
8
7
  readonly ignoreBinaries: ["lefthook", "gh"];
9
- readonly ignoreDependencies: ("@adamhl8/eslint-plugin-clean-modules" | "@commitlint/cli")[];
10
- readonly tsdown: false;
8
+ readonly ignoreDependencies: ["@adamhl8/eslint-plugin-clean-modules"];
11
9
  }>;
12
10
  //#endregion
13
11
  export { knipConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;;cA+Ba,UAAA,EAAU,qBAAA,CAAA,UAAA;EAAA"}
1
+ {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;;cAmBa,UAAA,EAAU,qBAAA,CAAA,UAAA;EAAA"}
@@ -1,25 +1,12 @@
1
1
  import { createMergeConfigFn } from "../utils.js";
2
2
  //#region src/configs/knip.base.ts
3
- const DEFAULT_ENTRIES = [
4
- "./src/index.ts",
5
- "**/*.test.ts",
6
- "./tsdown.config.ts"
7
- ];
8
- /**
9
- * Consuming projects show these transitive dependencies as unlisted. e.g. knip resolves
10
- * `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly in the
11
- * consuming project.
12
- */
13
- const UNLISTED_DEPENDENCIES = ["@adamhl8/eslint-plugin-clean-modules"];
14
- const IGNORE_DEPENDENCIES = [...["@commitlint/cli"], ...UNLISTED_DEPENDENCIES];
3
+ const IGNORE_BINARIES = ["lefthook", "gh"];
15
4
  const knipConfig = createMergeConfigFn({
16
- project: ["**"],
17
- entry: DEFAULT_ENTRIES,
18
- ignoreBinaries: ["lefthook", "gh"],
19
- ignoreDependencies: IGNORE_DEPENDENCIES,
20
- tsdown: false
5
+ project: ["**/*"],
6
+ ignoreBinaries: IGNORE_BINARIES,
7
+ ignoreDependencies: ["@adamhl8/eslint-plugin-clean-modules"]
21
8
  });
22
9
  //#endregion
23
- export { DEFAULT_ENTRIES, IGNORE_DEPENDENCIES, knipConfig };
10
+ export { IGNORE_BINARIES, knipConfig };
24
11
 
25
12
  //# sourceMappingURL=knip.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\n// Normally, specifying the `./src/index.ts` entry would cause knip to complain about a redundant entry because it gets automatically included via the tsdown plugin.\n// However, in projects that _don't_ use tsdown, the `./src/index.ts` entry would be missing entirely.\n// To handle this, we specify it and disable the tsdown plugin. This makes knip work in both cases.\n\nexport const DEFAULT_ENTRIES = [\"./src/index.ts\", \"**/*.test.ts\", \"./tsdown.config.ts\"] as const satisfies string[]\n\n/**\n * Consuming projects show these transitive dependencies as unlisted. e.g. knip resolves\n * `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly in the\n * consuming project.\n */\nconst UNLISTED_DEPENDENCIES = [\"@adamhl8/eslint-plugin-clean-modules\"] as const\n/**\n * Consuming projects show these dependencies as unused. e.g. `@commitlint/cli` can't be found by knip because it's\n * hidden by the fact that we call/extend our GitHub workflows.\n */\nconst UNUSED_DEPENDENCIES = [\"@commitlint/cli\"] as const\nexport const IGNORE_DEPENDENCIES = [...UNUSED_DEPENDENCIES, ...UNLISTED_DEPENDENCIES]\n\nconst baseConfig = {\n project: [\"**\"],\n entry: DEFAULT_ENTRIES,\n ignoreBinaries: [\"lefthook\", \"gh\"],\n ignoreDependencies: IGNORE_DEPENDENCIES,\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn<KnipConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AAQA,MAAa,kBAAkB;CAAC;CAAkB;CAAgB;AAAoB;;;;;;AAOtF,MAAM,wBAAwB,CAAC,sCAAsC;AAMrE,MAAa,sBAAsB,CAAC,GAAG,CADV,iBACU,GAAqB,GAAG,qBAAqB;AAUpF,MAAa,aAAa,oBAAmD;CAP3E,SAAS,CAAC,IAAI;CACd,OAAO;CACP,gBAAgB,CAAC,YAAY,IAAI;CACjC,oBAAoB;CACpB,QAAQ;AAGmE,CAAU"}
1
+ {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nexport const IGNORE_BINARIES = [\"lefthook\", \"gh\"] as const satisfies string[]\n\n/**\n * Consuming projects show these transitive dependencies as unlisted. e.g. knip resolves\n * `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly in the\n * consuming project.\n */\nconst UNLISTED_DEPENDENCIES = [\"@adamhl8/eslint-plugin-clean-modules\"] as const satisfies string[]\n\nconst baseConfig = {\n project: [\"**/*\"],\n ignoreBinaries: IGNORE_BINARIES,\n ignoreDependencies: UNLISTED_DEPENDENCIES,\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn<KnipConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AAIA,MAAa,kBAAkB,CAAC,YAAY,IAAI;AAehD,MAAa,aAAa,oBAAmD;CAL3E,SAAS,CAAC,MAAM;CAChB,gBAAgB;CAChB,oBAAoB,CALS,sCAKW;AAGmC,CAAU"}
@@ -3,6 +3,11 @@ import { OxlintConfig } from "oxlint";
3
3
 
4
4
  //#region src/configs/oxlint.base.d.ts
5
5
  declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
6
+ readonly options: {
7
+ readonly reportUnusedDisableDirectives: "error";
8
+ readonly typeAware: true;
9
+ readonly typeCheck: true;
10
+ };
6
11
  readonly categories: {
7
12
  readonly correctness: "error";
8
13
  readonly nursery: "error";
@@ -12,19 +17,14 @@ declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
12
17
  readonly style: "error";
13
18
  readonly suspicious: "error";
14
19
  };
20
+ readonly plugins: ["eslint", "react", "unicorn", "typescript", "oxc", "import", "jsdoc", "vitest", "jsx-a11y", "react-perf", "promise", "node"];
15
21
  readonly jsPlugins: [string];
16
- readonly options: {
17
- readonly reportUnusedDisableDirectives: "error";
18
- readonly typeAware: true;
19
- readonly typeCheck: true;
20
- };
21
22
  readonly overrides: [{
22
23
  readonly files: [".release-it.ts", "commitlint.config.ts", "knip.ts", "oxfmt.config.ts", "oxlint.config.ts", "prisma.config.ts", "tsdown.config.ts", "vitest.config.ts"];
23
24
  readonly rules: {
24
25
  readonly "import/no-default-export": "off";
25
26
  };
26
27
  }];
27
- readonly plugins: ["eslint", "react", "unicorn", "typescript", "oxc", "import", "jsdoc", "vitest", "jsx-a11y", "react-perf", "promise", "node"];
28
28
  readonly rules: {
29
29
  readonly "clean-modules/require-direct-exports": "error";
30
30
  readonly "clean-modules/require-import-extensions": "error";
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;;cAwHa,YAAA,EAAY,qBAAA,CAAA,YAAA;EAAA"}
1
+ {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;;cA6Ha,YAAA,EAAY,qBAAA,CAAA,YAAA;EAAA"}
@@ -1,6 +1,11 @@
1
1
  import { createMergeConfigFn } from "../utils.js";
2
2
  import { fileURLToPath } from "node:url";
3
3
  const oxlintConfig = createMergeConfigFn({
4
+ options: {
5
+ reportUnusedDisableDirectives: "error",
6
+ typeAware: true,
7
+ typeCheck: true
8
+ },
4
9
  categories: {
5
10
  correctness: "error",
6
11
  nursery: "error",
@@ -10,25 +15,6 @@ const oxlintConfig = createMergeConfigFn({
10
15
  style: "error",
11
16
  suspicious: "error"
12
17
  },
13
- jsPlugins: [fileURLToPath(import.meta.resolve("@adamhl8/eslint-plugin-clean-modules"))],
14
- options: {
15
- reportUnusedDisableDirectives: "error",
16
- typeAware: true,
17
- typeCheck: true
18
- },
19
- overrides: [{
20
- files: [
21
- ".release-it.ts",
22
- "commitlint.config.ts",
23
- "knip.ts",
24
- "oxfmt.config.ts",
25
- "oxlint.config.ts",
26
- "prisma.config.ts",
27
- "tsdown.config.ts",
28
- "vitest.config.ts"
29
- ],
30
- rules: { "import/no-default-export": "off" }
31
- }],
32
18
  plugins: [
33
19
  "eslint",
34
20
  "react",
@@ -43,6 +29,20 @@ const oxlintConfig = createMergeConfigFn({
43
29
  "promise",
44
30
  "node"
45
31
  ],
32
+ jsPlugins: [fileURLToPath(import.meta.resolve("@adamhl8/eslint-plugin-clean-modules"))],
33
+ overrides: [{
34
+ files: [
35
+ ".release-it.ts",
36
+ "commitlint.config.ts",
37
+ "knip.ts",
38
+ "oxfmt.config.ts",
39
+ "oxlint.config.ts",
40
+ "prisma.config.ts",
41
+ "tsdown.config.ts",
42
+ "vitest.config.ts"
43
+ ],
44
+ rules: { "import/no-default-export": "off" }
45
+ }],
46
46
  rules: {
47
47
  "clean-modules/require-direct-exports": "error",
48
48
  "clean-modules/require-import-extensions": "error",
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\"\n\nimport type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\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 // Resolve to an absolute path so consumers load it from this package's own deps.\n jsPlugins: [fileURLToPath(import.meta.resolve(\"@adamhl8/eslint-plugin-clean-modules\"))],\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n overrides: [\n {\n files: [\n \".release-it.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 \"vitest.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\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 rules: {\n \"clean-modules/require-direct-exports\": \"error\",\n \"clean-modules/require-import-extensions\": \"error\",\n \"clean-modules/require-subpath-imports\": \"error\",\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\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/prefer-default-export\": \"off\",\n \"init-declarations\": \"off\",\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"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-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"no-void\": \"off\",\n \"node/callback-return\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\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 \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\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-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\nexport const oxlintConfig = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AAwHA,MAAa,eAAe,oBAAqD;CAjH/E,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CAEA,WAAW,CAAC,cAAc,OAAO,KAAK,QAAQ,sCAAsC,CAAC,CAAC;CACtF,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CACA,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL,wCAAwC;EACxC,2CAA2C;EAC3C,yCAAyC;EAEzC,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EACxD,gCAAgC,CAAC,SAAS,EAAE,gBAAgB,MAAM,CAAC;EAEnE,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,qBAAqB;EACrB,uBAAuB;EACvB,yBAAyB;EACzB,wBAAwB;EACxB,aAAa;EACb,0BAA0B;EAC1B,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,wBAAwB;EACxB,sBAAsB;EACtB,oBAAoB;EACpB,eAAe;EACf,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,qBAAqB;EACrB,WAAW;EACX,wBAAwB;EACxB,gBAAgB;EAChB,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,iBAAiB;EACjB,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,2BAA2B;EAC3B,+BAA+B;EAC/B,8BAA8B;EAC9B,mBAAmB;EACnB,sCAAsC;EACtC,yCAAyC;EACzC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAG+E,CAAU"}
1
+ {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\"\n\nimport type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\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 // Resolve to an absolute path so consumers load it from this package's own deps.\n jsPlugins: [fileURLToPath(import.meta.resolve(\"@adamhl8/eslint-plugin-clean-modules\"))],\n\n overrides: [\n {\n files: [\n \".release-it.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 \"vitest.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n ],\n\n rules: {\n \"clean-modules/require-direct-exports\": \"error\",\n \"clean-modules/require-import-extensions\": \"error\",\n \"clean-modules/require-subpath-imports\": \"error\",\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\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/prefer-default-export\": \"off\",\n \"init-declarations\": \"off\",\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"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-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"no-void\": \"off\",\n \"node/callback-return\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\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 \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\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-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\nexport const oxlintConfig = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AA6HA,MAAa,eAAe,oBAAqD;CAtH/E,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CAEA,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CAEA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAGA,WAAW,CAAC,cAAc,OAAO,KAAK,QAAQ,sCAAsC,CAAC,CAAC;CAEtF,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CAEA,OAAO;EACL,wCAAwC;EACxC,2CAA2C;EAC3C,yCAAyC;EAEzC,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EACxD,gCAAgC,CAAC,SAAS,EAAE,gBAAgB,MAAM,CAAC;EAEnE,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,qBAAqB;EACrB,uBAAuB;EACvB,yBAAyB;EACzB,wBAAwB;EACxB,aAAa;EACb,0BAA0B;EAC1B,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,wBAAwB;EACxB,sBAAsB;EACtB,oBAAoB;EACpB,eAAe;EACf,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,qBAAqB;EACrB,WAAW;EACX,wBAAwB;EACxB,gBAAgB;EAChB,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,iBAAiB;EACjB,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,2BAA2B;EAC3B,+BAA+B;EAC/B,8BAA8B;EAC9B,mBAAmB;EACnB,sCAAsC;EACtC,yCAAyC;EACzC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAG+E,CAAU"}
@@ -3,16 +3,16 @@ import { Config } from "release-it";
3
3
 
4
4
  //#region src/configs/release-it.base.d.ts
5
5
  declare const releaseItConfig: OptionalMergeConfigFn<Config, {
6
+ readonly hooks: {
7
+ readonly "before:init": "nub run bundle";
8
+ readonly "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"];
9
+ };
6
10
  readonly git: {
7
11
  readonly commitMessage: "release: ${version}";
8
12
  readonly tagName: "${version}";
9
13
  readonly tagAnnotation: "release ${version}";
10
14
  readonly addUntrackedFiles: true;
11
15
  };
12
- readonly hooks: {
13
- readonly "before:init": "nub run bundle";
14
- readonly "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"];
15
- };
16
16
  readonly github: {
17
17
  readonly release: true;
18
18
  readonly releaseName: "${version}";
@@ -1,15 +1,15 @@
1
1
  import { createMergeConfigFn } from "../utils.js";
2
2
  const releaseItConfig = createMergeConfigFn({
3
+ hooks: {
4
+ "before:init": "nub run bundle",
5
+ "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"]
6
+ },
3
7
  git: {
4
8
  commitMessage: "release: ${version}",
5
9
  tagName: "${version}",
6
10
  tagAnnotation: "release ${version}",
7
11
  addUntrackedFiles: true
8
12
  },
9
- hooks: {
10
- "before:init": "nub run bundle",
11
- "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"]
12
- },
13
13
  github: {
14
14
  release: true,
15
15
  releaseName: "${version}",
@@ -1 +1 @@
1
- {"version":3,"file":"release-it.base.js","names":[],"sources":["../../src/configs/release-it.base.ts"],"sourcesContent":["// oxlint-disable no-template-curly-in-string\nimport type { Config } from \"release-it\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n addUntrackedFiles: true,\n },\n hooks: {\n \"before:init\": \"nub run bundle\",\n \"after:bump\": [\"adamhl8-cliff --tag ${version} -o\", \"nubx oxfmt CHANGELOG.md\"],\n },\n github: {\n release: true,\n releaseName: \"${version}\",\n releaseNotes: \"adamhl8-cliff --unreleased --tag ${version}\",\n },\n npm: {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - release-it doesn't support nub directly yet\n publishPackageManager: \"nub\" as \"bun\",\n publishPath: \"\",\n publishArgs: [\"--no-git-checks\"],\n },\n} as const satisfies Config\n\nexport const releaseItConfig = createMergeConfigFn<Config, typeof baseConfig>(baseConfig)\n"],"mappings":";AA6BA,MAAa,kBAAkB,oBAA+C;CAvB5E,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;EACf,mBAAmB;CACrB;CACA,OAAO;EACL,eAAe;EACf,cAAc,CAAC,qCAAqC,yBAAyB;CAC/E;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EAEH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,iBAAiB;CACjC;AAG4E,CAAU"}
1
+ {"version":3,"file":"release-it.base.js","names":[],"sources":["../../src/configs/release-it.base.ts"],"sourcesContent":["// oxlint-disable no-template-curly-in-string\nimport type { Config } from \"release-it\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n hooks: {\n \"before:init\": \"nub run bundle\",\n \"after:bump\": [\"adamhl8-cliff --tag ${version} -o\", \"nubx oxfmt CHANGELOG.md\"],\n },\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n addUntrackedFiles: true,\n },\n github: {\n release: true,\n releaseName: \"${version}\",\n releaseNotes: \"adamhl8-cliff --unreleased --tag ${version}\",\n },\n npm: {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - release-it doesn't support nub directly yet\n publishPackageManager: \"nub\" as \"bun\",\n publishPath: \"\",\n publishArgs: [\"--no-git-checks\"],\n },\n} as const satisfies Config\n\nexport const releaseItConfig = createMergeConfigFn<Config, typeof baseConfig>(baseConfig)\n"],"mappings":";AA6BA,MAAa,kBAAkB,oBAA+C;CAvB5E,OAAO;EACL,eAAe;EACf,cAAc,CAAC,qCAAqC,yBAAyB;CAC/E;CACA,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;EACf,mBAAmB;CACrB;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EAEH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,iBAAiB;CACjC;AAG4E,CAAU"}
@@ -5,43 +5,43 @@ import { UserConfig } from "tsdown";
5
5
  //#region src/configs/tsdown.base.d.ts
6
6
  type StrictUserConfig = SetRequired<UserConfig, "platform">;
7
7
  declare const baseConfig: {
8
- readonly attw: {
9
- readonly level: "error";
10
- readonly profile: "esm-only";
11
- };
8
+ readonly entry: ["./src/index.ts"];
9
+ readonly platform: "neutral";
10
+ readonly target: false;
11
+ readonly unbundle: true;
12
+ readonly sourcemap: true;
13
+ readonly minify: "dce-only";
14
+ readonly fixedExtension: false;
15
+ readonly hash: false;
12
16
  readonly dts: {
13
17
  readonly newContext: true;
14
18
  readonly resolver: "tsc";
15
19
  readonly sourcemap: true;
16
20
  };
17
- readonly entry: ["./src/index.ts"];
18
- readonly failOnWarn: true;
19
- readonly fixedExtension: false;
20
- readonly hash: false;
21
- readonly minify: "dce-only";
22
- readonly platform: "neutral";
21
+ readonly attw: {
22
+ readonly level: "error";
23
+ readonly profile: "esm-only";
24
+ };
23
25
  readonly publint: true;
24
- readonly sourcemap: true;
25
- readonly target: false;
26
- readonly unbundle: true;
26
+ readonly failOnWarn: true;
27
27
  };
28
28
  declare const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig>;
29
29
  declare const tsdownBinConfig: OptionalMergeConfigFn<UserConfig, {
30
- readonly attw: false;
31
- readonly dts: false;
32
30
  readonly entry: [];
31
+ readonly platform: "node";
32
+ readonly unbundle: false;
33
+ readonly sourcemap: false;
33
34
  readonly outExtensions: () => {
34
35
  readonly js: "";
35
36
  };
36
- readonly platform: "node";
37
- readonly sourcemap: false;
38
- readonly unbundle: false;
39
- readonly failOnWarn: true;
37
+ readonly dts: false;
38
+ readonly attw: false;
39
+ readonly target: false;
40
+ readonly minify: "dce-only";
40
41
  readonly fixedExtension: false;
41
42
  readonly hash: false;
42
- readonly minify: "dce-only";
43
43
  readonly publint: true;
44
- readonly target: false;
44
+ readonly failOnWarn: true;
45
45
  }>;
46
46
  //#endregion
47
47
  export { tsdownBinConfig, tsdownConfig };
@@ -1,35 +1,35 @@
1
1
  import { createMergeConfigFn } from "../utils.js";
2
2
  //#region src/configs/tsdown.base.ts
3
3
  const baseConfig = {
4
- attw: {
5
- level: "error",
6
- profile: "esm-only"
7
- },
4
+ entry: ["./src/index.ts"],
5
+ platform: "neutral",
6
+ target: false,
7
+ unbundle: true,
8
+ sourcemap: true,
9
+ minify: "dce-only",
10
+ fixedExtension: false,
11
+ hash: false,
8
12
  dts: {
9
13
  newContext: true,
10
14
  resolver: "tsc",
11
15
  sourcemap: true
12
16
  },
13
- entry: ["./src/index.ts"],
14
- failOnWarn: true,
15
- fixedExtension: false,
16
- hash: false,
17
- minify: "dce-only",
18
- platform: "neutral",
17
+ attw: {
18
+ level: "error",
19
+ profile: "esm-only"
20
+ },
19
21
  publint: true,
20
- sourcemap: true,
21
- target: false,
22
- unbundle: true
22
+ failOnWarn: true
23
23
  };
24
24
  const binConfig = {
25
25
  ...baseConfig,
26
- attw: false,
27
- dts: false,
28
26
  entry: [],
29
- outExtensions: () => ({ js: "" }),
30
27
  platform: "node",
28
+ unbundle: false,
31
29
  sourcemap: false,
32
- unbundle: false
30
+ outExtensions: () => ({ js: "" }),
31
+ dts: false,
32
+ attw: false
33
33
  };
34
34
  const tsdownConfig = createMergeConfigFn(baseConfig);
35
35
  const tsdownBinConfig = createMergeConfigFn(binConfig);
@@ -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 \"#/utils.ts\"\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\n// Force projects to specify platform\ntype StrictUserConfig = SetRequired<UserConfig, \"platform\">\n\nconst baseConfig = {\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n dts: {\n newContext: true,\n resolver: \"tsc\",\n sourcemap: true,\n },\n entry: [\"./src/index.ts\"],\n failOnWarn: true,\n fixedExtension: false,\n hash: false,\n minify: \"dce-only\",\n platform: \"neutral\",\n publint: true,\n sourcemap: true,\n target: false,\n unbundle: true,\n} as const satisfies StrictUserConfig\n\nconst binConfig = {\n ...baseConfig,\n attw: false,\n dts: false,\n entry: [],\n outExtensions: () => ({ js: \"\" }) as const,\n platform: \"node\",\n sourcemap: false,\n unbundle: false,\n} as const satisfies UserConfig\n\n// Annotated as the non-optional MergeConfigFn so projects must pass a config (platform is required)\nexport const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig> = createMergeConfigFn<\n StrictUserConfig,\n typeof baseConfig\n>(baseConfig)\nexport const tsdownBinConfig = createMergeConfigFn<UserConfig, typeof binConfig>(binConfig)\n"],"mappings":";;AASA,MAAM,aAAa;CACjB,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,KAAK;EACH,YAAY;EACZ,UAAU;EACV,WAAW;CACb;CACA,OAAO,CAAC,gBAAgB;CACxB,YAAY;CACZ,gBAAgB;CAChB,MAAM;CACN,QAAQ;CACR,UAAU;CACV,SAAS;CACT,WAAW;CACX,QAAQ;CACR,UAAU;AACZ;AAEA,MAAM,YAAY;CAChB,GAAG;CACH,MAAM;CACN,KAAK;CACL,OAAO,CAAC;CACR,sBAAsB,EAAE,IAAI,GAAG;CAC/B,UAAU;CACV,WAAW;CACX,UAAU;AACZ;AAGA,MAAa,eAAmE,oBAG9E,UAAU;AACZ,MAAa,kBAAkB,oBAAkD,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 \"#/utils.ts\"\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\n// Force projects to specify platform\ntype StrictUserConfig = 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 newContext: true,\n resolver: \"tsc\",\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n publint: true,\n failOnWarn: true,\n} as const satisfies StrictUserConfig\n\nconst binConfig = {\n ...baseConfig,\n entry: [],\n platform: \"node\",\n unbundle: false,\n sourcemap: false,\n outExtensions: () => ({ js: \"\" }) as const,\n dts: false,\n attw: false,\n} as const satisfies UserConfig\n\n// Annotated as the non-optional MergeConfigFn so projects must pass a config (platform is required)\nexport const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig> = createMergeConfigFn<\n StrictUserConfig,\n typeof baseConfig\n>(baseConfig)\nexport const tsdownBinConfig = createMergeConfigFn<UserConfig, typeof binConfig>(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,YAAY;EACZ,UAAU;EACV,WAAW;CACb;CACA,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,SAAS;CACT,YAAY;AACd;AAEA,MAAM,YAAY;CAChB,GAAG;CACH,OAAO,CAAC;CACR,UAAU;CACV,UAAU;CACV,WAAW;CACX,sBAAsB,EAAE,IAAI,GAAG;CAC/B,KAAK;CACL,MAAM;AACR;AAGA,MAAa,eAAmE,oBAG9E,UAAU;AACZ,MAAa,kBAAkB,oBAAkD,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "homepage": "https://github.com/adamhl8/configs",
5
5
  "bugs": {
6
6
  "url": "https://github.com/adamhl8/configs/issues"
@@ -16,8 +16,7 @@
16
16
  "url": "git+https://github.com/adamhl8/configs.git"
17
17
  },
18
18
  "bin": {
19
- "adamhl8-cliff": "./dist/adamhl8-cliff/index",
20
- "adamhl8-knip": "./dist/adamhl8-knip/index"
19
+ "adamhl8-cliff": "./dist/adamhl8-cliff/index"
21
20
  },
22
21
  "files": [
23
22
  "./dist/"
@@ -41,7 +40,7 @@
41
40
  "access": "public"
42
41
  },
43
42
  "scripts": {
44
- "lint": "markdown-toc -i --bullets '-' --maxdepth 3 ./README.md && oxfmt && oxlint --fix --fix-suggestions --fix-dangerously && adamhl8-knip",
43
+ "lint": "markdown-toc -i --bullets '-' --maxdepth 3 ./README.md && oxfmt && oxlint --fix --fix-suggestions --fix-dangerously && knip",
45
44
  "bump-deps": "nub update -L && rm -f lock.yaml && nub i --no-frozen-lockfile && oxfmt lock.yaml",
46
45
  "bundle": "nub run lint && tsdown",
47
46
  "release": "gh workflow run release.yml",
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env nub
2
- import { spawnSync } from "node:child_process";
3
- import { existsSync } from "node:fs";
4
- import path from "node:path";
5
- import process from "node:process";
6
- //#region src/adamhl8-knip/index.ts
7
- const KNIP_PREPROCESSOR_PATH = path.resolve(import.meta.dirname, "./knip-preprocessor");
8
- process.exitCode = spawnSync("knip", [
9
- "--preprocessor",
10
- `${KNIP_PREPROCESSOR_PATH}${existsSync(`${KNIP_PREPROCESSOR_PATH}.ts`) ? ".ts" : ".js"}`,
11
- ...process.argv.slice(2)
12
- ], { stdio: "inherit" }).status;
13
- //#endregion
14
- export {};
@@ -1,24 +0,0 @@
1
- import "es-toolkit";
2
- //#endregion
3
- //#region src/configs/knip.base.ts
4
- const DEFAULT_ENTRIES = [
5
- "./src/index.ts",
6
- "**/*.test.ts",
7
- "./tsdown.config.ts"
8
- ];
9
- /**
10
- * Consuming projects show these transitive dependencies as unlisted. e.g. knip resolves
11
- * `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly in the
12
- * consuming project.
13
- */
14
- const UNLISTED_DEPENDENCIES = ["@adamhl8/eslint-plugin-clean-modules"];
15
- const IGNORE_DEPENDENCIES = [...["@commitlint/cli"], ...UNLISTED_DEPENDENCIES];
16
- //#endregion
17
- //#region src/adamhl8-knip/knip-preprocessor.ts
18
- const preprocess = (options) => {
19
- options.configurationHints = options.configurationHints.filter((hint) => !(DEFAULT_ENTRIES.some((entry) => typeof hint.identifier === "string" && hint.identifier.includes(entry)) && (hint.type === "entry-empty" || hint.type === "entry-redundant")));
20
- options.configurationHints = options.configurationHints.filter((hint) => !(IGNORE_DEPENDENCIES.some((dep) => typeof hint.identifier === "string" && hint.identifier.includes(dep)) && hint.type === "ignoreDependencies"));
21
- return options;
22
- };
23
- //#endregion
24
- export { preprocess as default };