These are my settings for Prettier.
You might like them - or you might not. Don't worry; you can always change them to match your coding preferences.
Install the package using pnpm
(or npm
, or yarn
):
pnpm add -D @andrskr/prettier-config
Add the prettier
key to your package.json
diff --git a/package.json b/package.json
index 2ecef3d..260838f 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"keywords": [
"prettier"
],
+ "prettier": "@andrskr/prettier-config"
Check out the prettier
documentation for more info on sharing configurations.
The following plugins are included in the Prettier configuration:
-
@ianvs/prettier-plugin-sort-imports: An opinionated but flexible prettier plugin to sort import statements.
-
prettier-plugin-jsdoc: A Prettier plugin to format JSDoc comments.
-
prettier-plugin-tailwindcss: A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order.