From d40125b0a26bc3e70f4e904479928a7c196c62b4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 30 Jul 2024 15:51:10 +0200 Subject: [PATCH] Use prettier-plugin-tailwindcss for js files only --- .prettierrc | 9 ++++++++- scripts/format.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.prettierrc b/.prettierrc index 14853fc2..3ab74d37 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,11 @@ { "proseWrap": "always", - "plugins": ["prettier-plugin-tailwindcss"] + "overrides": [ + { + "files": "*.js", + "options": { + "plugins": ["prettier-plugin-tailwindcss"] + } + } + ] } diff --git a/scripts/format.sh b/scripts/format.sh index 94d12316..3184af4c 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -11,4 +11,4 @@ while getopts c option; do esac done -npx prettier@3.3.3 --$op --no-config "./src/**/*.md" "./src/**/*.mdx" +npx prettier@3.3.3 --$op "./src/**/*.md" "./src/**/*.mdx"