From 1cb651608c11bffbff7e28b6b7f660fcc24ea651 Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Thu, 25 Apr 2024 20:16:18 +0200 Subject: [PATCH] Make prettier plugins work again --- .prettierrc.json | 12 +++ package-lock.json | 199 ++++++++++++++++++++++------------------------ package.json | 7 +- 3 files changed, 111 insertions(+), 107 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index eb5110d47..7049a69af 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -4,12 +4,24 @@ "singleQuote": true, "semi": false, "sortTailwindcssClasses": true, + "plugins": [ + "prettier-plugin-tailwindcss", + "@prettier/plugin-php", + "@shufo/prettier-plugin-blade" + ], "overrides": [ { "files": "*.yml", "options": { "tabWidth": 2 } + }, + { + "files": ["*.blade.php"], + "options": { + "parser": "blade", + "tabWidth": 4 + } } ] } diff --git a/package-lock.json b/package-lock.json index 5ba1f6c7d..558b4b737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,8 +37,8 @@ "vue3-click-away": "^1.2.4" }, "devDependencies": { - "@prettier/plugin-php": "^0.18.2", - "@shufo/prettier-plugin-blade": "^1.2.4", + "@prettier/plugin-php": "^0.22.2", + "@shufo/prettier-plugin-blade": "^1.14.1", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^5.0.4", @@ -47,7 +47,8 @@ "jquery": "^3.5.0", "laravel-vite-plugin": "^1.0.2", "postcss": "^8.4.31", - "prettier": "^2.5.1", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.14", "tailwind-scrollbar": "^2.1.0-preview.0", "tailwindcss": "^3.0.15", "vite": "^5.2.6", @@ -749,16 +750,16 @@ } }, "node_modules/@prettier/plugin-php": { - "version": "0.18.9", + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@prettier/plugin-php/-/plugin-php-0.22.2.tgz", + "integrity": "sha512-md0+7tNbsP0oy+wIP3KZZc6fzx1k1jtWaMjOy/gM8yU9f2BDYEi+iHOc/UNPihYvPI28zFTbjvlhH4QXQjQwNg==", "dev": true, - "license": "MIT", "dependencies": { - "linguist-languages": "^7.21.0", - "mem": "^8.0.0", - "php-parser": "3.1.0-beta.11" + "linguist-languages": "^7.27.0", + "php-parser": "^3.1.5" }, "peerDependencies": { - "prettier": "^1.15.0 || ^2.0.0" + "prettier": "^3.0.0" } }, "node_modules/@rollup/rollup-android-arm-eabi": { @@ -958,8 +959,9 @@ }, "node_modules/@shufo/prettier-plugin-blade": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@shufo/prettier-plugin-blade/-/prettier-plugin-blade-1.14.1.tgz", + "integrity": "sha512-CPeFzNOh/wHlEFTUzt+mqOe66oXRSh51/DQzmv9DaN77I8QzLVwoKNx10bl+9PtZVc65+6kE4dg7+4iG1epqeA==", "dev": true, - "license": "MIT", "dependencies": { "blade-formatter": "1.41.1", "prettier": "3.2.5" @@ -968,20 +970,6 @@ "node": ">= 14.0.0" } }, - "node_modules/@shufo/prettier-plugin-blade/node_modules/prettier": { - "version": "3.2.5", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/@shufo/tailwindcss-class-sorter": { "version": "3.0.1", "dev": true, @@ -1471,37 +1459,6 @@ "node": ">= 14.0.0" } }, - "node_modules/blade-formatter/node_modules/@prettier/plugin-php": { - "version": "0.22.2", - "dev": true, - "license": "MIT", - "dependencies": { - "linguist-languages": "^7.27.0", - "php-parser": "^3.1.5" - }, - "peerDependencies": { - "prettier": "^3.0.0" - } - }, - "node_modules/blade-formatter/node_modules/php-parser": { - "version": "3.1.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/blade-formatter/node_modules/prettier": { - "version": "3.2.5", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/bootstrap": { "version": "3.4.1", "license": "MIT", @@ -2847,17 +2804,6 @@ "node": ">=12" } }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "p-defer": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/masonry-layout": { "version": "4.2.2", "license": "MIT", @@ -2874,21 +2820,6 @@ "remove-accents": "0.5.0" } }, - "node_modules/mem": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/mem?sponsor=1" - } - }, "node_modules/merge2": { "version": "1.4.1", "dev": true, @@ -2945,14 +2876,6 @@ "node": ">= 0.6" } }, - "node_modules/mimic-fn": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/mini-svg-data-uri": { "version": "1.4.4", "dev": true, @@ -3125,14 +3048,6 @@ "get-size": "^2.0.2" } }, - "node_modules/p-defer": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/pako": { "version": "2.1.0", "license": "(MIT AND Zlib)" @@ -3174,9 +3089,10 @@ } }, "node_modules/php-parser": { - "version": "3.1.0-beta.11", - "dev": true, - "license": "BSD-3-Clause" + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.1.5.tgz", + "integrity": "sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==", + "dev": true }, "node_modules/picocolors": { "version": "1.0.0", @@ -3319,19 +3235,94 @@ "license": "MIT" }, "node_modules/prettier": { - "version": "2.8.8", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, - "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.14.tgz", + "integrity": "sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q==", + "dev": true, + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig-melody": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig-melody": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, "node_modules/proto-list": { "version": "1.2.4", "dev": true, diff --git a/package.json b/package.json index 846f9deb8..be90f7182 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "build": "vite build" }, "devDependencies": { - "@prettier/plugin-php": "^0.18.2", - "@shufo/prettier-plugin-blade": "^1.2.4", + "@prettier/plugin-php": "^0.22.2", + "@shufo/prettier-plugin-blade": "^1.14.1", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^5.0.4", @@ -16,7 +16,8 @@ "jquery": "^3.5.0", "laravel-vite-plugin": "^1.0.2", "postcss": "^8.4.31", - "prettier": "^2.5.1", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.14", "tailwind-scrollbar": "^2.1.0-preview.0", "tailwindcss": "^3.0.15", "vite": "^5.2.6",