@zayne-labs/prettier-config 0.7.1 → 0.7.2
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 +31 -19
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,18 @@ import { AnyString } from '@zayne-labs/toolkit-type-helpers';
|
|
|
2
2
|
import { Config } from 'prettier';
|
|
3
3
|
|
|
4
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;
|
|
5
|
+
readonly experimentalOperatorPosition: "start";
|
|
6
|
+
readonly jsxSingleQuote: false;
|
|
7
|
+
readonly printWidth: 107;
|
|
8
|
+
readonly singleQuote: false;
|
|
9
|
+
readonly tabWidth: 3;
|
|
10
|
+
readonly trailingComma: "es5";
|
|
11
|
+
readonly useTabs: true;
|
|
12
12
|
};
|
|
13
13
|
type ConfigWithTailwind = Omit<Config, "plugins"> & {
|
|
14
|
+
customAttributes?: string[];
|
|
15
|
+
customFunctions?: string[];
|
|
16
|
+
endPosition?: "absolute-with-indent" | "absolute" | "relative";
|
|
14
17
|
plugins?: Array<"prettier-plugin-tailwindcss" | "prettier-plugin-classnames" | "prettier-plugin-merge" | AnyString>;
|
|
15
18
|
tailwindAttributes?: string[];
|
|
16
19
|
tailwindConfig?: `./${string}`;
|
|
@@ -19,19 +22,28 @@ type ConfigWithTailwind = Omit<Config, "plugins"> & {
|
|
|
19
22
|
tailwindPreserveWhitespace?: boolean;
|
|
20
23
|
tailwindStylesheet?: `./${string}`;
|
|
21
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* @description Prettier configuration with Tailwind CSS support.
|
|
27
|
+
*
|
|
28
|
+
* @docs
|
|
29
|
+
* - [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
|
|
30
|
+
* - [prettier-plugin-classnames](https://github.com/ony3000/prettier-plugin-classnames)
|
|
31
|
+
*/
|
|
22
32
|
declare const configWithTailwind: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
readonly customAttributes: ["classNames", "classes"];
|
|
34
|
+
readonly customFunctions: ["cnMerge", "cnJoin", "cn", "tv"];
|
|
35
|
+
readonly endingPosition: "absolute-with-indent";
|
|
36
|
+
readonly plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-classnames", "prettier-plugin-merge"];
|
|
37
|
+
readonly tailwindAttributes: ["classNames", "classes"];
|
|
38
|
+
readonly tailwindFunctions: ["cnMerge", "cnJoin", "cn", "tv"];
|
|
39
|
+
readonly tailwindStylesheet: "./tailwind.css";
|
|
40
|
+
readonly experimentalOperatorPosition: "start";
|
|
41
|
+
readonly jsxSingleQuote: false;
|
|
42
|
+
readonly printWidth: 107;
|
|
43
|
+
readonly singleQuote: false;
|
|
44
|
+
readonly tabWidth: 3;
|
|
45
|
+
readonly trailingComma: "es5";
|
|
46
|
+
readonly useTabs: true;
|
|
35
47
|
};
|
|
36
48
|
|
|
37
49
|
export { type ConfigWithTailwind, baseConfig, configWithTailwind };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { defineEnum } from '@zayne-labs/toolkit-type-helpers';
|
|
2
|
-
|
|
3
1
|
// src/configs.ts
|
|
4
|
-
var baseConfig =
|
|
2
|
+
var baseConfig = {
|
|
5
3
|
experimentalOperatorPosition: "start",
|
|
6
4
|
jsxSingleQuote: false,
|
|
7
5
|
printWidth: 107,
|
|
@@ -9,15 +7,17 @@ var baseConfig = defineEnum({
|
|
|
9
7
|
tabWidth: 3,
|
|
10
8
|
trailingComma: "es5",
|
|
11
9
|
useTabs: true
|
|
12
|
-
}
|
|
13
|
-
var configWithTailwind =
|
|
10
|
+
};
|
|
11
|
+
var configWithTailwind = {
|
|
14
12
|
...baseConfig,
|
|
13
|
+
customAttributes: ["classNames", "classes"],
|
|
14
|
+
customFunctions: ["cnMerge", "cnJoin", "cn", "tv"],
|
|
15
15
|
endingPosition: "absolute-with-indent",
|
|
16
16
|
plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-classnames", "prettier-plugin-merge"],
|
|
17
17
|
tailwindAttributes: ["classNames", "classes"],
|
|
18
18
|
tailwindFunctions: ["cnMerge", "cnJoin", "cn", "tv"],
|
|
19
19
|
tailwindStylesheet: "./tailwind.css"
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
|
|
22
22
|
export { baseConfig, configWithTailwind };
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/configs.ts"],"names":[],"mappings":";AAGO,IAAM,UAAa,GAAA;AAAA,EACzB,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;AAyBO,IAAM,kBAAqB,GAAA;AAAA,EACjC,GAAG,UAAA;AAAA,EACH,gBAAA,EAAkB,CAAC,YAAA,EAAc,SAAS,CAAA;AAAA,EAC1C,eAAiB,EAAA,CAAC,SAAW,EAAA,QAAA,EAAU,MAAM,IAAI,CAAA;AAAA,EACjD,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,iBAAmB,EAAA,CAAC,SAAW,EAAA,QAAA,EAAU,MAAM,IAAI,CAAA;AAAA,EACnD,kBAAoB,EAAA;AACrB","file":"index.js","sourcesContent":["import type { AnyString } from \"@zayne-labs/toolkit-type-helpers\";\nimport type { Config } from \"prettier\";\n\nexport const baseConfig = {\n\texperimentalOperatorPosition: \"start\",\n\tjsxSingleQuote: false,\n\tprintWidth: 107,\n\tsingleQuote: false,\n\ttabWidth: 3,\n\ttrailingComma: \"es5\",\n\tuseTabs: true,\n} as const 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 */\nexport const configWithTailwind = {\n\t...baseConfig,\n\tcustomAttributes: [\"classNames\", \"classes\"],\n\tcustomFunctions: [\"cnMerge\", \"cnJoin\", \"cn\", \"tv\"],\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\"],\n\ttailwindStylesheet: \"./tailwind.css\",\n} as const satisfies ConfigWithTailwind;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zayne-labs/prettier-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"description": "Zayne Labs' Prettier config",
|
|
6
6
|
"author": "Ryan Zayne",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tsup": "^8.4.0",
|
|
50
50
|
"typescript": "5.8.2",
|
|
51
51
|
"vitest": "3.0.7",
|
|
52
|
-
"@zayne-labs/tsconfig": "0.7.
|
|
52
|
+
"@zayne-labs/tsconfig": "0.7.2"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public",
|