@zayne-labs/prettier-config 0.8.2 → 0.9.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/dist/index.d.ts CHANGED
@@ -1,26 +1,19 @@
1
- import { AnyString } from '@zayne-labs/toolkit-type-helpers';
2
- import { Config } from 'prettier';
1
+ import { AnyString } from "@zayne-labs/toolkit-type-helpers";
2
+ import { Config } from "prettier";
3
3
 
4
- declare const baseConfig: {
5
- experimentalOperatorPosition: "start";
6
- jsxSingleQuote: false;
7
- printWidth: 107;
8
- singleQuote: false;
9
- tabWidth: 3;
10
- trailingComma: "es5";
11
- useTabs: true;
12
- };
4
+ //#region src/configs.d.ts
5
+ declare const baseConfig: Config;
13
6
  type ConfigWithTailwind = Omit<Config, "plugins"> & {
14
- customAttributes?: string[];
15
- customFunctions?: string[];
16
- endPosition?: "absolute-with-indent" | "absolute" | "relative";
17
- plugins?: Array<"prettier-plugin-tailwindcss" | "prettier-plugin-classnames" | "prettier-plugin-merge" | AnyString>;
18
- tailwindAttributes?: string[];
19
- tailwindConfig?: `./${string}`;
20
- tailwindFunctions?: string[];
21
- tailwindPreserveDuplicates?: boolean;
22
- tailwindPreserveWhitespace?: boolean;
23
- tailwindStylesheet?: `./${string}`;
7
+ customAttributes?: string[];
8
+ customFunctions?: string[];
9
+ endPosition?: "absolute-with-indent" | "absolute" | "relative";
10
+ plugins?: Array<"prettier-plugin-tailwindcss" | "prettier-plugin-classnames" | "prettier-plugin-merge" | AnyString>;
11
+ tailwindAttributes?: string[];
12
+ tailwindConfig?: `./${string}`;
13
+ tailwindFunctions?: string[];
14
+ tailwindPreserveDuplicates?: boolean;
15
+ tailwindPreserveWhitespace?: boolean;
16
+ tailwindStylesheet?: `./${string}`;
24
17
  };
25
18
  /**
26
19
  * @description Prettier configuration with Tailwind CSS support.
@@ -30,47 +23,18 @@ type ConfigWithTailwind = Omit<Config, "plugins"> & {
30
23
  * - [prettier-plugin-classnames](https://github.com/ony3000/prettier-plugin-classnames)
31
24
  * - [prettier-plugin-merge](https://github.com/ony3000/prettier-plugin-merge)
32
25
  */
33
- declare const configWithTailwind: {
34
- customAttributes: ["classNames", "classes"];
35
- customFunctions: ["cnMerge", "cnJoin", "cn", "tv", "tw"];
36
- endingPosition: "absolute-with-indent";
37
- plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-classnames", "prettier-plugin-merge"];
38
- tailwindAttributes: ["classNames", "classes"];
39
- tailwindFunctions: ["cnMerge", "cnJoin", "cn", "tv", "tw"];
40
- tailwindStylesheet: "./tailwind.css";
41
- experimentalOperatorPosition: "start";
42
- jsxSingleQuote: false;
43
- printWidth: 107;
44
- singleQuote: false;
45
- tabWidth: 3;
46
- trailingComma: "es5";
47
- useTabs: true;
48
- };
26
+ declare const configWithTailwind: any;
49
27
  type ConfigWithAstro = Omit<Config, "plugins"> & {
50
- astroAllowShorthand?: boolean;
51
- astroSkipFrontmatter?: boolean;
52
- plugins?: Array<"prettier-plugin-astro" | AnyString>;
28
+ astroAllowShorthand?: boolean;
29
+ astroSkipFrontmatter?: boolean;
30
+ plugins?: Array<"prettier-plugin-astro" | AnyString>;
53
31
  };
54
32
  /**
55
33
  * @description Prettier configuration with Astro support.
56
34
  *
57
35
  * @docs [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro#configuration)
58
36
  */
59
- declare const configWithAstro: {
60
- overrides: [{
61
- files: "*.astro";
62
- options: {
63
- parser: "astro";
64
- };
65
- }];
66
- plugins: ["prettier-plugin-astro"];
67
- experimentalOperatorPosition: "start";
68
- jsxSingleQuote: false;
69
- printWidth: 107;
70
- singleQuote: false;
71
- tabWidth: 3;
72
- trailingComma: "es5";
73
- useTabs: true;
74
- };
75
-
76
- export { type ConfigWithAstro, type ConfigWithTailwind, baseConfig, configWithAstro, configWithTailwind };
37
+ declare const configWithAstro: any;
38
+ //#endregion
39
+ export { ConfigWithAstro, ConfigWithTailwind, baseConfig, configWithAstro, configWithTailwind };
40
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,38 +1,63 @@
1
- import { defineEnum, defineEnumDeep } from '@zayne-labs/toolkit-type-helpers';
1
+ import { defineEnum, defineEnumDeep } from "@zayne-labs/toolkit-type-helpers";
2
2
 
3
- // src/configs.ts
4
- var baseConfig = defineEnum({
5
- experimentalOperatorPosition: "start",
6
- jsxSingleQuote: false,
7
- printWidth: 107,
8
- singleQuote: false,
9
- tabWidth: 3,
10
- trailingComma: "es5",
11
- useTabs: true
3
+ //#region src/configs.ts
4
+ const baseConfig = defineEnum({
5
+ experimentalOperatorPosition: "start",
6
+ jsxSingleQuote: false,
7
+ printWidth: 107,
8
+ singleQuote: false,
9
+ tabWidth: 3,
10
+ trailingComma: "es5",
11
+ useTabs: true
12
12
  });
13
- var configWithTailwind = defineEnumDeep({
14
- ...baseConfig,
15
- customAttributes: ["classNames", "classes"],
16
- customFunctions: ["cnMerge", "cnJoin", "cn", "tv", "tw"],
17
- endingPosition: "absolute-with-indent",
18
- plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-classnames", "prettier-plugin-merge"],
19
- tailwindAttributes: ["classNames", "classes"],
20
- tailwindFunctions: ["cnMerge", "cnJoin", "cn", "tv", "tw"],
21
- tailwindStylesheet: "./tailwind.css"
13
+ /**
14
+ * @description Prettier configuration with Tailwind CSS support.
15
+ *
16
+ * @docs
17
+ * - [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
18
+ * - [prettier-plugin-classnames](https://github.com/ony3000/prettier-plugin-classnames)
19
+ * - [prettier-plugin-merge](https://github.com/ony3000/prettier-plugin-merge)
20
+ */
21
+ const configWithTailwind = defineEnumDeep({
22
+ ...baseConfig,
23
+ customAttributes: ["classNames", "classes"],
24
+ customFunctions: [
25
+ "cnMerge",
26
+ "cnJoin",
27
+ "cn",
28
+ "tv",
29
+ "tw"
30
+ ],
31
+ endingPosition: "absolute-with-indent",
32
+ plugins: [
33
+ "prettier-plugin-tailwindcss",
34
+ "prettier-plugin-classnames",
35
+ "prettier-plugin-merge"
36
+ ],
37
+ tailwindAttributes: ["classNames", "classes"],
38
+ tailwindFunctions: [
39
+ "cnMerge",
40
+ "cnJoin",
41
+ "cn",
42
+ "tv",
43
+ "tw"
44
+ ],
45
+ tailwindStylesheet: "./tailwind.css"
22
46
  });
23
- var configWithAstro = defineEnumDeep({
24
- ...baseConfig,
25
- overrides: [
26
- {
27
- files: "*.astro",
28
- options: {
29
- parser: "astro"
30
- }
31
- }
32
- ],
33
- plugins: ["prettier-plugin-astro"]
47
+ /**
48
+ * @description Prettier configuration with Astro support.
49
+ *
50
+ * @docs [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro#configuration)
51
+ */
52
+ const configWithAstro = defineEnumDeep({
53
+ ...baseConfig,
54
+ overrides: [{
55
+ files: "*.astro",
56
+ options: { parser: "astro" }
57
+ }],
58
+ plugins: ["prettier-plugin-astro"]
34
59
  });
35
60
 
61
+ //#endregion
36
62
  export { baseConfig, configWithAstro, configWithTailwind };
37
- //# sourceMappingURL=index.js.map
38
63
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs.ts"],"names":[],"mappings":";;;AAGO,IAAM,aAAa,UAAW,CAAA;AAAA,EACpC,4BAA8B,EAAA,OAAA;AAAA,EAC9B,cAAgB,EAAA,KAAA;AAAA,EAChB,UAAY,EAAA,GAAA;AAAA,EACZ,WAAa,EAAA,KAAA;AAAA,EACb,QAAU,EAAA,CAAA;AAAA,EACV,aAAe,EAAA,KAAA;AAAA,EACf,OAAS,EAAA;AACV,CAAC;AA0BM,IAAM,qBAAqB,cAAe,CAAA;AAAA,EAChD,GAAG,UAAA;AAAA,EAEH,gBAAA,EAAkB,CAAC,YAAA,EAAc,SAAS,CAAA;AAAA,EAC1C,iBAAiB,CAAC,SAAA,EAAW,QAAU,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA;AAAA,EACvD,cAAgB,EAAA,sBAAA;AAAA,EAChB,OAAS,EAAA,CAAC,6BAA+B,EAAA,4BAAA,EAA8B,uBAAuB,CAAA;AAAA,EAC9F,kBAAA,EAAoB,CAAC,YAAA,EAAc,SAAS,CAAA;AAAA,EAC5C,mBAAmB,CAAC,SAAA,EAAW,QAAU,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA;AAAA,EACzD,kBAAoB,EAAA;AACrB,CAAC;AAcM,IAAM,kBAAkB,cAAe,CAAA;AAAA,EAC7C,GAAG,UAAA;AAAA,EAEH,SAAW,EAAA;AAAA,IACV;AAAA,MACC,KAAO,EAAA,SAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACR,MAAQ,EAAA;AAAA;AACT;AACD,GACD;AAAA,EACA,OAAA,EAAS,CAAC,uBAAuB;AAClC,CAAC","file":"index.js","sourcesContent":["import { type AnyString, defineEnum, defineEnumDeep } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { Config } from \"prettier\";\n\nexport const baseConfig = defineEnum({\n\texperimentalOperatorPosition: \"start\",\n\tjsxSingleQuote: false,\n\tprintWidth: 107,\n\tsingleQuote: false,\n\ttabWidth: 3,\n\ttrailingComma: \"es5\",\n\tuseTabs: true,\n}) satisfies Config;\n\nexport type ConfigWithTailwind = Omit<Config, \"plugins\"> & {\n\tcustomAttributes?: string[];\n\tcustomFunctions?: string[];\n\tendPosition?: \"absolute-with-indent\" | \"absolute\" | \"relative\";\n\tplugins?: Array<\n\t\t// eslint-disable-next-line perfectionist/sort-union-types -- prettier-plugin-tailwindcss should come before prettier-plugin-classnames\n\t\t\"prettier-plugin-tailwindcss\" | \"prettier-plugin-classnames\" | \"prettier-plugin-merge\" | AnyString\n\t>;\n\ttailwindAttributes?: string[];\n\ttailwindConfig?: `./${string}`;\n\ttailwindFunctions?: string[];\n\ttailwindPreserveDuplicates?: boolean;\n\ttailwindPreserveWhitespace?: boolean;\n\ttailwindStylesheet?: `./${string}`;\n};\n\n/**\n * @description Prettier configuration with Tailwind CSS support.\n *\n * @docs\n * - [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)\n * - [prettier-plugin-classnames](https://github.com/ony3000/prettier-plugin-classnames)\n * - [prettier-plugin-merge](https://github.com/ony3000/prettier-plugin-merge)\n */\nexport const configWithTailwind = defineEnumDeep({\n\t...baseConfig,\n\n\tcustomAttributes: [\"classNames\", \"classes\"],\n\tcustomFunctions: [\"cnMerge\", \"cnJoin\", \"cn\", \"tv\", \"tw\"],\n\tendingPosition: \"absolute-with-indent\",\n\tplugins: [\"prettier-plugin-tailwindcss\", \"prettier-plugin-classnames\", \"prettier-plugin-merge\"],\n\ttailwindAttributes: [\"classNames\", \"classes\"],\n\ttailwindFunctions: [\"cnMerge\", \"cnJoin\", \"cn\", \"tv\", \"tw\"],\n\ttailwindStylesheet: \"./tailwind.css\",\n}) satisfies ConfigWithTailwind;\n\nexport type ConfigWithAstro = Omit<Config, \"plugins\"> & {\n\tastroAllowShorthand?: boolean;\n\tastroSkipFrontmatter?: boolean;\n\tplugins?: Array<\"prettier-plugin-astro\" | AnyString>;\n};\n\n/**\n * @description Prettier configuration with Astro support.\n *\n * @docs [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro#configuration)\n */\n\nexport const configWithAstro = defineEnumDeep({\n\t...baseConfig,\n\n\toverrides: [\n\t\t{\n\t\t\tfiles: \"*.astro\",\n\t\t\toptions: {\n\t\t\t\tparser: \"astro\",\n\t\t\t},\n\t\t},\n\t],\n\tplugins: [\"prettier-plugin-astro\"],\n}) satisfies ConfigWithAstro;\n"]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/configs.ts"],"sourcesContent":["import { type AnyString, defineEnum, defineEnumDeep } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { Config } from \"prettier\";\n\nexport const baseConfig = defineEnum({\n\texperimentalOperatorPosition: \"start\",\n\tjsxSingleQuote: false,\n\tprintWidth: 107,\n\tsingleQuote: false,\n\ttabWidth: 3,\n\ttrailingComma: \"es5\",\n\tuseTabs: true,\n}) satisfies Config;\n\nexport type ConfigWithTailwind = Omit<Config, \"plugins\"> & {\n\tcustomAttributes?: string[];\n\tcustomFunctions?: string[];\n\tendPosition?: \"absolute-with-indent\" | \"absolute\" | \"relative\";\n\tplugins?: Array<\n\t\t// eslint-disable-next-line perfectionist/sort-union-types -- prettier-plugin-tailwindcss should come before prettier-plugin-classnames\n\t\t\"prettier-plugin-tailwindcss\" | \"prettier-plugin-classnames\" | \"prettier-plugin-merge\" | AnyString\n\t>;\n\ttailwindAttributes?: string[];\n\ttailwindConfig?: `./${string}`;\n\ttailwindFunctions?: string[];\n\ttailwindPreserveDuplicates?: boolean;\n\ttailwindPreserveWhitespace?: boolean;\n\ttailwindStylesheet?: `./${string}`;\n};\n\n/**\n * @description Prettier configuration with Tailwind CSS support.\n *\n * @docs\n * - [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)\n * - [prettier-plugin-classnames](https://github.com/ony3000/prettier-plugin-classnames)\n * - [prettier-plugin-merge](https://github.com/ony3000/prettier-plugin-merge)\n */\nexport const configWithTailwind = defineEnumDeep({\n\t...baseConfig,\n\n\tcustomAttributes: [\"classNames\", \"classes\"],\n\tcustomFunctions: [\"cnMerge\", \"cnJoin\", \"cn\", \"tv\", \"tw\"],\n\tendingPosition: \"absolute-with-indent\",\n\tplugins: [\"prettier-plugin-tailwindcss\", \"prettier-plugin-classnames\", \"prettier-plugin-merge\"],\n\ttailwindAttributes: [\"classNames\", \"classes\"],\n\ttailwindFunctions: [\"cnMerge\", \"cnJoin\", \"cn\", \"tv\", \"tw\"],\n\ttailwindStylesheet: \"./tailwind.css\",\n}) satisfies ConfigWithTailwind;\n\nexport type ConfigWithAstro = Omit<Config, \"plugins\"> & {\n\tastroAllowShorthand?: boolean;\n\tastroSkipFrontmatter?: boolean;\n\tplugins?: Array<\"prettier-plugin-astro\" | AnyString>;\n};\n\n/**\n * @description Prettier configuration with Astro support.\n *\n * @docs [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro#configuration)\n */\n\nexport const configWithAstro = defineEnumDeep({\n\t...baseConfig,\n\n\toverrides: [\n\t\t{\n\t\t\tfiles: \"*.astro\",\n\t\t\toptions: {\n\t\t\t\tparser: \"astro\",\n\t\t\t},\n\t\t},\n\t],\n\tplugins: [\"prettier-plugin-astro\"],\n}) satisfies ConfigWithAstro;\n"],"mappings":";;;AAGA,MAAa,aAAa,WAAW;CACpC,8BAA8B;CAC9B,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,UAAU;CACV,eAAe;CACf,SAAS;AACT,EAAC;;;;;;;;;AA0BF,MAAa,qBAAqB,eAAe;CAChD,GAAG;CAEH,kBAAkB,CAAC,cAAc,SAAU;CAC3C,iBAAiB;EAAC;EAAW;EAAU;EAAM;EAAM;CAAK;CACxD,gBAAgB;CAChB,SAAS;EAAC;EAA+B;EAA8B;CAAwB;CAC/F,oBAAoB,CAAC,cAAc,SAAU;CAC7C,mBAAmB;EAAC;EAAW;EAAU;EAAM;EAAM;CAAK;CAC1D,oBAAoB;AACpB,EAAC;;;;;;AAcF,MAAa,kBAAkB,eAAe;CAC7C,GAAG;CAEH,WAAW,CACV;EACC,OAAO;EACP,SAAS,EACR,QAAQ,QACR;CAEF,CAAA;CACD,SAAS,CAAC,uBAAwB;AAClC,EAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/prettier-config",
3
3
  "type": "module",
4
- "version": "0.8.2",
4
+ "version": "0.9.0",
5
5
  "description": "Zayne Labs' Prettier config",
6
6
  "author": "Ryan Zayne",
7
7
  "license": "MIT",
@@ -22,9 +22,6 @@
22
22
  "exports": {
23
23
  ".": "./dist/index.js"
24
24
  },
25
- "main": "./dist/index.js",
26
- "module": "./dist/index.js",
27
- "types": "./dist/index.d.ts",
28
25
  "files": [
29
26
  "dist"
30
27
  ],
@@ -32,11 +29,11 @@
32
29
  "node": ">=18.x"
33
30
  },
34
31
  "dependencies": {
35
- "@zayne-labs/toolkit-type-helpers": "^0.9.9"
32
+ "@zayne-labs/toolkit-type-helpers": "^0.9.42"
36
33
  },
37
34
  "devDependencies": {
38
- "@arethetypeswrong/cli": "^0.17.4",
39
- "@changesets/cli": "^2.29.2",
35
+ "@arethetypeswrong/cli": "^0.18.1",
36
+ "@changesets/cli": "^2.29.4",
40
37
  "@size-limit/esbuild-why": "^11.2.0",
41
38
  "@size-limit/preset-small-lib": "^11.2.0",
42
39
  "@total-typescript/ts-reset": "^0.6.1",
@@ -45,9 +42,9 @@
45
42
  "cross-env": "^7.0.3",
46
43
  "publint": "^0.3.12",
47
44
  "size-limit": "^11.2.0",
48
- "tsup": "^8.4.0",
45
+ "tsdown": "^0.11.9",
49
46
  "typescript": "5.8.3",
50
- "@zayne-labs/tsconfig": "0.8.2"
47
+ "@zayne-labs/tsconfig": "0.9.0"
51
48
  },
52
49
  "publishConfig": {
53
50
  "access": "public",
@@ -61,8 +58,8 @@
61
58
  }
62
59
  ],
63
60
  "scripts": {
64
- "build": "tsup",
65
- "build:dev": "cross-env NODE_ENV=development tsup",
61
+ "build": "tsdown",
62
+ "build:dev": "cross-env NODE_ENV=development tsdown",
66
63
  "build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
67
64
  "dev": "pnpm build:dev --watch",
68
65
  "lint:attw": "attw --pack . --ignore-rules=cjs-resolves-to-esm",