@wkovacs64/prettier-config 4.2.2 → 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.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/index.js +11 -1
  3. package/package.json +16 -16
package/README.md CHANGED
@@ -36,9 +36,13 @@ Follow the Prettier documentation on [sharing configurations][prettier-sharing].
36
36
  #### `.prettierignore`
37
37
 
38
38
  ```
39
+ # .gitignore and...
40
+
39
41
  .changeset
40
42
  package.json
41
43
  package-lock.json
44
+ pnpm-lock.yaml
45
+ bun.lock
42
46
  ```
43
47
 
44
48
  ### Customization
package/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import { createRequire } from 'node:module';
2
+
3
+ const require = createRequire(import.meta.url);
4
+
1
5
  /** @type {import("prettier").Options} */
2
6
  export default {
3
7
  $schema: 'http://json.schemastore.org/prettierrc',
@@ -27,7 +31,13 @@ export default {
27
31
  printWidth: 100,
28
32
  singleQuote: true,
29
33
 
30
- plugins: ['prettier-plugin-astro', 'prettier-plugin-tailwindcss'],
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
+ ],
31
41
  tailwindAttributes: ['class', 'className', '.*[cC]lassName'],
32
42
  tailwindFunctions: ['clsx', 'cn'],
33
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wkovacs64/prettier-config",
3
- "version": "4.2.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.6.14"
41
+ "prettier-plugin-tailwindcss": "^0.7.2"
50
42
  },
51
43
  "devDependencies": {
52
- "@changesets/changelog-github": "0.5.1",
53
- "@changesets/cli": "2.29.7",
54
- "@wkovacs64/eslint-config": "7.10.0",
44
+ "@changesets/changelog-github": "0.5.2",
45
+ "@changesets/cli": "2.29.8",
46
+ "@wkovacs64/eslint-config": "7.11.1",
55
47
  "cross-env": "10.1.0",
56
- "eslint": "9.37.0",
57
- "prettier": "3.6.2"
48
+ "eslint": "9.39.2",
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
+ }