@wkovacs64/prettier-config 4.2.3 → 4.2.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.
- package/index.js +10 -3
- package/package.json +12 -12
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
3
4
|
|
|
4
5
|
/** @type {import("prettier").Options} */
|
|
5
6
|
export default {
|
|
@@ -30,7 +31,13 @@ export default {
|
|
|
30
31
|
printWidth: 100,
|
|
31
32
|
singleQuote: true,
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
// Use require.resolve() to get absolute paths (strings) instead of importing plugin modules
|
|
35
|
+
// directly. This makes the config serializable for the VSCode Prettier extension's worker thread,
|
|
36
|
+
// while also ensuring plugins resolve correctly with non-hoisting package managers like pnpm.
|
|
37
|
+
plugins: [
|
|
38
|
+
require.resolve('prettier-plugin-astro'),
|
|
39
|
+
require.resolve('prettier-plugin-tailwindcss'),
|
|
40
|
+
],
|
|
34
41
|
tailwindAttributes: ['class', 'className', '.*[cC]lassName'],
|
|
35
42
|
tailwindFunctions: ['clsx', 'cn'],
|
|
36
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wkovacs64/prettier-config",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "@wKovacs64 Prettier config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prettier",
|
|
@@ -28,14 +28,6 @@
|
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/wKovacs64/prettier-config/issues"
|
|
30
30
|
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"changeset": "changeset",
|
|
33
|
-
"changeset:version": "changeset version && npm install --package-lock-only",
|
|
34
|
-
"changeset:publish": "changeset publish",
|
|
35
|
-
"format": "prettier --cache --write .",
|
|
36
|
-
"format:check": "prettier --cache --check .",
|
|
37
|
-
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint ."
|
|
38
|
-
},
|
|
39
31
|
"private": false,
|
|
40
32
|
"prettier": "./index.js",
|
|
41
33
|
"publishConfig": {
|
|
@@ -46,14 +38,22 @@
|
|
|
46
38
|
},
|
|
47
39
|
"dependencies": {
|
|
48
40
|
"prettier-plugin-astro": "^0.14.1",
|
|
49
|
-
"prettier-plugin-tailwindcss": "^0.7.
|
|
41
|
+
"prettier-plugin-tailwindcss": "^0.7.2"
|
|
50
42
|
},
|
|
51
43
|
"devDependencies": {
|
|
52
44
|
"@changesets/changelog-github": "0.5.2",
|
|
53
45
|
"@changesets/cli": "2.29.8",
|
|
54
46
|
"@wkovacs64/eslint-config": "7.11.1",
|
|
55
47
|
"cross-env": "10.1.0",
|
|
56
|
-
"eslint": "9.39.
|
|
48
|
+
"eslint": "9.39.2",
|
|
57
49
|
"prettier": "3.7.4"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"changeset": "changeset",
|
|
53
|
+
"changeset:version": "changeset version && pnpm install",
|
|
54
|
+
"changeset:publish": "changeset publish",
|
|
55
|
+
"format": "prettier --cache --write .",
|
|
56
|
+
"format:check": "prettier --cache --check .",
|
|
57
|
+
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint ."
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|