From 924cbd845f1c37693e92169335429626435e551d Mon Sep 17 00:00:00 2001 From: aedwardg Date: Sun, 26 Jan 2025 08:17:04 -0800 Subject: [PATCH 1/2] add tailwind prettier plugin --- package-lock.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 6 ++++ 2 files changed, 86 insertions(+) diff --git a/package-lock.json b/package-lock.json index 82274aa..568b6e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "lint-staged": "^15.3.0", "postcss": "^8.4.49", "prettier": "3.4.2", + "prettier-plugin-tailwindcss": "^0.6.11", "tailwindcss": "^3.4.17", "typescript": "~5.6.2", "typescript-eslint": "^8.18.2", @@ -5037,6 +5038,85 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.11.tgz", + "integrity": "sha512-YxaYSIvZPAqhrrEpRtonnrXdghZg1irNg4qrjboCXrpybLWVs55cW2N3juhspVJiO0JBvYJT8SYsJpc8OQSnsA==", + "dev": true, + "license": "MIT", + "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": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "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": { + "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-multiline-arrays": { + "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/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index e08406a..87a047a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "lint-staged": "^15.3.0", "postcss": "^8.4.49", "prettier": "3.4.2", + "prettier-plugin-tailwindcss": "^0.6.11", "tailwindcss": "^3.4.17", "typescript": "~5.6.2", "typescript-eslint": "^8.18.2", @@ -41,5 +42,10 @@ "lint-staged": { "*.{js,jsx,ts,tsx}": "eslint --fix", "*.{js,jsx,ts,tsx,md,html,css}": "prettier --write" + }, + "prettier": { + "plugins": [ + "prettier-plugin-tailwindcss" + ] } } From 427e5ae0068243d3bf4fc6c15857f65f6e94b7cd Mon Sep 17 00:00:00 2001 From: aedwardg Date: Sun, 26 Jan 2025 08:17:27 -0800 Subject: [PATCH 2/2] run prettier on project with tailwind plugin enabled --- src/components/Layout/Footer.tsx | 8 +++---- src/components/Layout/Header.tsx | 6 ++--- src/routes/About/index.tsx | 2 +- src/routes/Home/CTA.tsx | 10 ++++---- src/routes/Home/Features.tsx | 32 ++++++++++++------------- src/routes/Home/Hero.tsx | 12 +++++----- src/routes/Home/Showcase.tsx | 40 ++++++++++++++++---------------- 7 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/components/Layout/Footer.tsx b/src/components/Layout/Footer.tsx index bb554ce..de9befa 100644 --- a/src/components/Layout/Footer.tsx +++ b/src/components/Layout/Footer.tsx @@ -3,16 +3,16 @@ import { Code } from "lucide-react"; export default function Footer() { return ( -