@lehoczky/prettier-config
v2.0.0
Published
[![npm version](https://badge.fury.io/js/@lehoczky%2Fprettier-config.svg)](https://badge.fury.io/js/@lehoczky%2Fprettier-config)
Downloads
181
Readme
Prettier Config
Shared prettier configuration.
💿 Installation
pnpm add -D prettier @lehoczky/prettier-config
💻 Usage
.prettierrc.json
:
"@lehoczky/prettier-config"
or when extending an existing config:
.prettierrc.mjs
:
import config from "@lehoczky/prettier-config"
/** @type {import("prettier").Options} */
export default {
...config,
}
Example command:
{
"scripts": {
"format:fix": "prettier . --write --ignore-unknown"
}
}
Example for using with tailwindcss and prettier-plugin-tailwindcss:
pnpm add -D prettier prettier-plugin-tailwindcss @lehoczky/prettier-config
.prettierrc.mjs
:
import config from "@lehoczky/prettier-config"
/** @type {import("prettier").Options} */
export default {
...config,
tailwindConfig: "./tailwind.config.ts",
plugins: ["prettier-plugin-tailwindcss"],
}