@zayne-labs/prettier-config 0.6.4

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.
@@ -0,0 +1,37 @@
1
+ import { AnyString } from '@zayne-labs/toolkit-type-helpers';
2
+ import { Config } from 'prettier';
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
+ };
13
+ type ConfigWithTailwind = Omit<Config, "plugins"> & {
14
+ plugins?: Array<"prettier-plugin-tailwindcss" | "prettier-plugin-classnames" | "prettier-plugin-merge" | AnyString>;
15
+ tailwindAttributes?: string[];
16
+ tailwindConfig?: `./${string}`;
17
+ tailwindFunctions?: string[];
18
+ tailwindPreserveDuplicates?: boolean;
19
+ tailwindPreserveWhitespace?: boolean;
20
+ tailwindStylesheet?: `./${string}`;
21
+ };
22
+ declare const configWithTailwind: {
23
+ endingPosition: string;
24
+ plugins: ("prettier-plugin-tailwindcss" | "prettier-plugin-classnames" | "prettier-plugin-merge")[];
25
+ tailwindAttributes: string[];
26
+ tailwindFunctions: string[];
27
+ tailwindStylesheet: "./tailwind.css";
28
+ experimentalOperatorPosition: "start";
29
+ jsxSingleQuote: false;
30
+ printWidth: 107;
31
+ singleQuote: false;
32
+ tabWidth: 3;
33
+ trailingComma: "es5";
34
+ useTabs: true;
35
+ };
36
+
37
+ export { type ConfigWithTailwind, baseConfig, configWithTailwind };
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ import { defineEnum } from '@zayne-labs/toolkit-type-helpers';
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
12
+ });
13
+ var configWithTailwind = defineEnum({
14
+ ...baseConfig,
15
+ endingPosition: "absolute-with-indent",
16
+ plugins: ["prettier-plugin-tailwindcss", "prettier-plugin-classnames", "prettier-plugin-merge"],
17
+ tailwindAttributes: ["classNames", "classes"],
18
+ tailwindFunctions: ["cnMerge", "cnJoin", "cn", "tv"],
19
+ tailwindStylesheet: "./tailwind.css"
20
+ });
21
+
22
+ export { baseConfig, configWithTailwind };
23
+ //# sourceMappingURL=index.js.map
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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;AAeM,IAAM,qBAAqB,UAAW,CAAA;AAAA,EAC5C,GAAG,UAAA;AAAA,EACH,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,CAA8B","file":"index.js","sourcesContent":["import { type AnyString, defineEnum } 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\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\nexport const configWithTailwind = defineEnum({\n\t...baseConfig,\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} satisfies ConfigWithTailwind);\n"]}
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@zayne-labs/prettier-config",
3
+ "type": "module",
4
+ "version": "0.6.4",
5
+ "description": "Zayne Labs' Prettier config",
6
+ "author": "Ryan Zayne",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/ryan-zayne/config/tree/main/packages/prettier-config#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/zayne-labs/config.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/zayne-labs/config/issues"
15
+ },
16
+ "keywords": [
17
+ "utilities",
18
+ "types",
19
+ "hooks"
20
+ ],
21
+ "sideEffects": false,
22
+ "exports": {
23
+ ".": "./dist/index.js"
24
+ },
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "engines": {
32
+ "node": ">=18.x"
33
+ },
34
+ "dependencies": {
35
+ "@zayne-labs/toolkit-type-helpers": "^0.8.48"
36
+ },
37
+ "devDependencies": {
38
+ "@arethetypeswrong/cli": "^0.17.4",
39
+ "@changesets/cli": "^2.28.1",
40
+ "@size-limit/esbuild-why": "^11.2.0",
41
+ "@size-limit/preset-small-lib": "^11.2.0",
42
+ "@total-typescript/ts-reset": "^0.6.1",
43
+ "clsx": "^2.1.1",
44
+ "concurrently": "^9.1.2",
45
+ "cross-env": "^7.0.3",
46
+ "publint": "^0.3.7",
47
+ "size-limit": "^11.2.0",
48
+ "terser": "^5.39.0",
49
+ "tsup": "^8.4.0",
50
+ "typescript": "5.8.2",
51
+ "vitest": "3.0.7",
52
+ "@zayne-labs/tsconfig": "0.6.4"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public",
56
+ "registry": "https://registry.npmjs.org/",
57
+ "provenance": true
58
+ },
59
+ "size-limit": [
60
+ {
61
+ "path": "./src/index.ts",
62
+ "limit": "400 b"
63
+ }
64
+ ],
65
+ "scripts": {
66
+ "build": "tsup",
67
+ "build:dev": "cross-env NODE_ENV=development tsup",
68
+ "build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
69
+ "dev": "pnpm build:dev --watch",
70
+ "lint:attw": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
71
+ "lint:publint": "publint --strict .",
72
+ "lint:size": "size-limit",
73
+ "lint:type-check": "tsc --pretty -p tsconfig.json",
74
+ "release": "pnpm publish --no-git-checks",
75
+ "release:old": "changeset publish",
76
+ "release:test": "pnpx pkg-pr-new publish",
77
+ "test": "vitest run",
78
+ "test:dev": "vitest dev"
79
+ }
80
+ }