skyltmax_config 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/skyltmax_config/version.rb +1 -1
- data/package.json +2 -2
- data/pnpm-lock.yaml +880 -1220
- data/prettier.js +14 -3
- metadata +1 -1
data/prettier.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
// Try to load the Tailwind plugin if available
|
|
2
|
+
let tailwindPlugin
|
|
3
|
+
try {
|
|
4
|
+
tailwindPlugin = await import("prettier-plugin-tailwindcss")
|
|
5
|
+
} catch {
|
|
6
|
+
// Plugin not installed, that's okay
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
/** @type {import("prettier").Options} */
|
|
2
10
|
export const config = {
|
|
3
11
|
arrowParens: "avoid",
|
|
@@ -39,9 +47,12 @@ export const config = {
|
|
|
39
47
|
},
|
|
40
48
|
},
|
|
41
49
|
],
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
// Only include Tailwind plugin and config if it's available
|
|
51
|
+
...(tailwindPlugin && {
|
|
52
|
+
plugins: ["prettier-plugin-tailwindcss"],
|
|
53
|
+
tailwindAttributes: ["class", "className", ".*[cC]lassName"],
|
|
54
|
+
tailwindFunctions: ["clsx", "cn", "twcn"],
|
|
55
|
+
}),
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
// this is for backward compatibility
|