@adamhl8/configs 0.11.1 → 0.13.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.
package/README.md CHANGED
@@ -26,9 +26,9 @@ bun add -D @adamhl8/configs
26
26
  ### prettier
27
27
 
28
28
  ```js
29
- import prettierConfig from "@adamhl8/configs/prettier"
29
+ import { config } from "@adamhl8/configs/prettier"
30
30
 
31
31
  export default {
32
- ...prettierConfig,
32
+ ...config,
33
33
  }
34
34
  ```
@@ -1,9 +1,9 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3
3
  "root": false,
4
4
  // https://github.com/biomejs/biome/issues/6676
5
5
  // Extending this config from the root config of this project causes an error because the plugin files do not exist in 'node_modules'. i.e. the whole 'node_modules/@adamhl8/configs' directory does not exist
6
- // As a workaround, we use the prepare script to manually copy the './configs/biome-plugins/' directory to the correct location in 'node_modules'.
6
+ // As a workaround, we use the prepare script to manually copy the './src/biome-plugins/' directory to the correct location in 'node_modules'.
7
7
  "plugins": ["./node_modules/@adamhl8/configs/dist/biome-plugins/import-paths.grit"],
8
8
  "vcs": {
9
9
  "enabled": true,
@@ -52,7 +52,6 @@
52
52
  "useSortedClasses": "on"
53
53
  },
54
54
  "performance": {
55
- "noBarrelFile": "on",
56
55
  "noDelete": "on",
57
56
  "noReExportAll": "on",
58
57
  "useTopLevelRegex": "on",
@@ -172,7 +171,7 @@
172
171
  },
173
172
  "overrides": [
174
173
  {
175
- "includes": ["**/*.tsx"],
174
+ "includes": ["**/*.tsx", "./knip.ts", "./prettier.config.js", "tsdown.config.ts"],
176
175
  "linter": {
177
176
  "rules": {
178
177
  "style": {
@@ -0,0 +1,4 @@
1
+ import { knipConfig } from "./knip.js";
2
+ import { prettierConfig } from "./prettier.js";
3
+ import { tsdownConfig } from "./tsdown.js";
4
+ export { knipConfig, prettierConfig, tsdownConfig };
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { knipConfig } from "./knip.js";
2
+ import { prettierConfig } from "./prettier.js";
3
+ import { tsdownConfig } from "./tsdown.js";
4
+ export { knipConfig, prettierConfig, tsdownConfig };
package/dist/knip.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ //#region src/knip.d.ts
2
+ declare const knipConfig: {
3
+ readonly entry: ["**/*.test.ts"];
4
+ readonly project: ["**"];
5
+ };
6
+ //#endregion
7
+ export { knipConfig };
8
+ //# sourceMappingURL=knip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knip.d.ts","names":[],"sources":["../src/knip.ts"],"sourcesContent":[],"mappings":";cAEa;EAAA,SAAA,KAGkB,EAAA,CAAA,cAAA,CAAA"}
package/dist/knip.js ADDED
@@ -0,0 +1,7 @@
1
+ const knipConfig = {
2
+ entry: ["**/*.test.ts"],
3
+ project: ["**"]
4
+ };
5
+ export { knipConfig };
6
+
7
+ //# sourceMappingURL=knip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knip.js","names":[],"sources":["../src/knip.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nexport const knipConfig = {\n entry: [\"**/*.test.ts\"], // knip automatically grabs the `./src/index.ts` entrypoint with its tsdown plugin\n project: [\"**\"],\n} as const satisfies KnipConfig\n"],"mappings":"AAEA,MAAa,aAAa;CACxB,OAAO,CAAC,eAAe;CACvB,SAAS,CAAC,KAAK;CAChB"}
@@ -1,3 +1,21 @@
1
- import type { Config } from "prettier";
2
- declare const config: Config;
3
- export default config;
1
+ //#region src/prettier.d.ts
2
+ declare const prettierConfig: {
3
+ readonly printWidth: 120;
4
+ readonly semi: false;
5
+ readonly plugins: ["@prettier/plugin-xml", "prettier-plugin-sh", "prettier-plugin-toml", "prettier-plugin-astro", "prettier-plugin-tailwindcss"];
6
+ readonly tailwindStylesheet: "./src/global.css";
7
+ readonly overrides: [{
8
+ readonly files: "*.jsonc";
9
+ readonly options: {
10
+ readonly trailingComma: "none";
11
+ };
12
+ }, {
13
+ readonly files: "*.astro";
14
+ readonly options: {
15
+ readonly parser: "astro";
16
+ };
17
+ }];
18
+ };
19
+ //#endregion
20
+ export { prettierConfig };
21
+ //# sourceMappingURL=prettier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.d.ts","names":[],"sources":["../src/prettier.ts"],"sourcesContent":[],"mappings":";cAEa;EAAA,SAAA,UA0Bc,EAAA,GAAA"}
package/dist/prettier.js CHANGED
@@ -1,29 +1,22 @@
1
- const config = {
2
- printWidth: 120,
3
- semi: false,
4
- plugins: [
5
- "@prettier/plugin-xml",
6
- "prettier-plugin-sh",
7
- "prettier-plugin-toml",
8
- "prettier-plugin-astro",
9
- "prettier-plugin-tailwindcss",
10
- ],
11
- tailwindStylesheet: "./src/global.css",
12
- overrides: [
13
- {
14
- // https://github.com/prettier/prettier/issues/15956
15
- files: "*.jsonc",
16
- options: {
17
- trailingComma: "none",
18
- },
19
- },
20
- {
21
- files: "*.astro",
22
- options: {
23
- parser: "astro",
24
- },
25
- },
26
- ],
1
+ const prettierConfig = {
2
+ printWidth: 120,
3
+ semi: false,
4
+ plugins: [
5
+ "@prettier/plugin-xml",
6
+ "prettier-plugin-sh",
7
+ "prettier-plugin-toml",
8
+ "prettier-plugin-astro",
9
+ "prettier-plugin-tailwindcss"
10
+ ],
11
+ tailwindStylesheet: "./src/global.css",
12
+ overrides: [{
13
+ files: "*.jsonc",
14
+ options: { trailingComma: "none" }
15
+ }, {
16
+ files: "*.astro",
17
+ options: { parser: "astro" }
18
+ }]
27
19
  };
28
- export default config;
20
+ export { prettierConfig };
21
+
29
22
  //# sourceMappingURL=prettier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prettier.js","sourceRoot":"","sources":["../configs/prettier.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAW;IACrB,UAAU,EAAE,GAAG;IACf,IAAI,EAAE,KAAK;IACX,OAAO,EAAE;QACP,sBAAsB;QACtB,oBAAoB;QACpB,sBAAsB;QACtB,uBAAuB;QACvB,6BAA6B;KAC9B;IACD,kBAAkB,EAAE,kBAAkB;IACtC,SAAS,EAAE;QACT;YACE,oDAAoD;YACpD,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,aAAa,EAAE,MAAM;aACtB;SACF;QACD;YACE,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,MAAM,EAAE,OAAO;aAChB;SACF;KACF;CACF,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"prettier.js","names":[],"sources":["../src/prettier.ts"],"sourcesContent":["import type { Config } from \"prettier\"\n\nexport const prettierConfig = {\n printWidth: 120,\n semi: false,\n plugins: [\n \"@prettier/plugin-xml\",\n \"prettier-plugin-sh\",\n \"prettier-plugin-toml\",\n \"prettier-plugin-astro\",\n \"prettier-plugin-tailwindcss\",\n ],\n tailwindStylesheet: \"./src/global.css\",\n overrides: [\n {\n // https://github.com/prettier/prettier/issues/15956\n files: \"*.jsonc\",\n options: {\n trailingComma: \"none\",\n },\n },\n {\n files: \"*.astro\",\n options: {\n parser: \"astro\",\n },\n },\n ],\n} as const satisfies Config\n"],"mappings":"AAEA,MAAa,iBAAiB;CAC5B,YAAY;CACZ,MAAM;CACN,SAAS;EACP;EACA;EACA;EACA;EACA;EACD;CACD,oBAAoB;CACpB,WAAW,CACT;EAEE,OAAO;EACP,SAAS,EACP,eAAe,QAChB;EACF,EACD;EACE,OAAO;EACP,SAAS,EACP,QAAQ,SACT;EACF,CACF;CACF"}
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
+ "exclude": ["${configDir}/dist/"],
3
4
  "compilerOptions": {
4
5
  "target": "ESNext",
5
6
  "jsx": "react-jsx",
@@ -10,17 +11,12 @@
10
11
  "verbatimModuleSyntax": true,
11
12
  "esModuleInterop": false,
12
13
  "allowSyntheticDefaultImports": true,
13
- // Need to use '.js' extensions in packages. See: https://github.com/microsoft/TypeScript/issues/61991
14
- // For non-packages (or anything we don't compile with tsc), we need to set 'rewriteRelativeImportExtensions' to false and 'noEmit' to true
15
14
  "allowImportingTsExtensions": true,
16
- "rewriteRelativeImportExtensions": true,
17
15
  "resolveJsonModule": true,
18
16
  "allowJs": true,
19
17
  "checkJs": true,
20
18
  "skipLibCheck": true,
21
- "declaration": true,
22
- "sourceMap": true,
23
- "outDir": "${configDir}/dist/",
19
+ "noEmit": true,
24
20
 
25
21
  // Strictness
26
22
  "strict": true,
@@ -0,0 +1,23 @@
1
+ //#region src/tsdown.d.ts
2
+ declare const tsdownConfig: {
3
+ readonly entry: ["./src/index.ts"];
4
+ readonly unbundle: true;
5
+ readonly target: false;
6
+ readonly platform: "neutral";
7
+ readonly minify: "dce-only";
8
+ readonly sourcemap: true;
9
+ readonly dts: {
10
+ readonly newContext: true;
11
+ readonly sourcemap: true;
12
+ };
13
+ readonly attw: {
14
+ readonly level: "error";
15
+ readonly profile: "esmOnly";
16
+ };
17
+ readonly publint: true;
18
+ readonly logLevel: "warn";
19
+ readonly failOnWarn: true;
20
+ };
21
+ //#endregion
22
+ export { tsdownConfig };
23
+ //# sourceMappingURL=tsdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdown.d.ts","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":[],"mappings":";cAEa;EAAA,SAAA,KAAA,EAkBkB,CAAA,gBAAA,CAAA"}
package/dist/tsdown.js ADDED
@@ -0,0 +1,22 @@
1
+ const tsdownConfig = {
2
+ entry: ["./src/index.ts"],
3
+ unbundle: true,
4
+ target: false,
5
+ platform: "neutral",
6
+ minify: "dce-only",
7
+ sourcemap: true,
8
+ dts: {
9
+ newContext: true,
10
+ sourcemap: true
11
+ },
12
+ attw: {
13
+ level: "error",
14
+ profile: "esmOnly"
15
+ },
16
+ publint: true,
17
+ logLevel: "warn",
18
+ failOnWarn: true
19
+ };
20
+ export { tsdownConfig };
21
+
22
+ //# sourceMappingURL=tsdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdown.js","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\n\nexport const tsdownConfig = {\n entry: [\"./src/index.ts\"],\n unbundle: true,\n target: false,\n platform: \"neutral\",\n minify: \"dce-only\",\n sourcemap: true,\n dts: {\n newContext: true,\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esmOnly\",\n },\n publint: true,\n logLevel: \"warn\",\n failOnWarn: true,\n} as const satisfies UserConfig\n"],"mappings":"AAEA,MAAa,eAAe;CAC1B,OAAO,CAAC,iBAAiB;CACzB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,KAAK;EACH,YAAY;EACZ,WAAW;EACZ;CACD,MAAM;EACJ,OAAO;EACP,SAAS;EACV;CACD,SAAS;CACT,UAAU;CACV,YAAY;CACb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,17 +19,17 @@
19
19
  "exports": {
20
20
  "./tsconfig": "./dist/tsconfig.json",
21
21
  "./biome": "./dist/biome.base.jsonc",
22
- "./prettier": {
23
- "import": "./dist/prettier.js",
24
- "types": "./dist/types/prettier.d.ts"
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js"
25
25
  }
26
26
  },
27
27
  "files": ["dist/"],
28
28
  "scripts": {
29
- "bundle": "rm -rf ./dist && bun lint && tsc && tsc-alias && cp -r ./configs/*.{json,jsonc} ./configs/biome-plugins/ ./dist/",
30
- "copy-biome-plugins": "mkdir -p ./node_modules/@adamhl8/configs/dist/ && cp -r ./configs/biome-plugins/ ./node_modules/@adamhl8/configs/dist/",
29
+ "bundle": "bun lint && bun tsdown",
31
30
  "lint": "tsc --noEmit && biome check --write",
32
- "prepare": "bun copy-biome-plugins && find .githooks -type f -exec ln -srf {} .git/hooks/ \\; || true",
31
+ "postinstall": "mkdir -p ./node_modules/@adamhl8/configs/dist/ && cp -r ./src/biome-plugins/ ./node_modules/@adamhl8/configs/dist/",
32
+ "prepare": "find .githooks -type f -exec ln -srf {} .git/hooks/ \\; || true",
33
33
  "prepublishOnly": "bun bundle"
34
34
  },
35
35
  "dependencies": {
@@ -40,10 +40,13 @@
40
40
  "prettier-plugin-toml": "^2.0.6"
41
41
  },
42
42
  "devDependencies": {
43
- "@biomejs/biome": "^2.2.0",
44
- "@types/bun": "^1.2.20",
43
+ "@arethetypeswrong/core": "^0.18.2",
44
+ "@biomejs/biome": "^2.2.4",
45
+ "@types/bun": "^1.2.21",
46
+ "knip": "^5.63.1",
45
47
  "prettier": "^3.6.2",
46
- "tsc-alias": "^1.8.16",
48
+ "publint": "^0.3.12",
49
+ "tsdown": "^0.15.0",
47
50
  "typescript": "^5.9.2"
48
51
  },
49
52
  "publishConfig": {