Prettier configuration for humans with support for React, Vue, Svelte, Astro, Tailwind CSS, and more.
npm install -D @esmate/prettier prettierCheck out ESMate CLI for better integration with ESLint
Define your Prettier configuration in a prettier.config.js file:
// @ts-check
import { defineConfig } from "@esmate/prettier";
export default defineConfig({
// astro: true,
// svelte: true,
tailwind: {
tailwindFunctions: ["cn"],
tailwindStylesheet: "src/global.css",
},
ignores: [],
});Run Prettier to check your code:
prettier --check .Automatically fix formatting issues:
prettier --write .