
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@kjanat/prettier-config
Advanced tools
Shareable Prettier configuration with plugin support.
# Bun
bun add -d @kjanat/prettier-config prettier
# npm
npm install --save-dev @kjanat/prettier-config prettier
Install as needed:
bun add -d \
@prettier/plugin-xml \
prettier-plugin-go-template \
prettier-plugin-nginx \
prettier-plugin-pkg \
prettier-plugin-prisma \
prettier-plugin-sh \
prettier-plugin-tailwindcss \
prettier-plugin-toml
Add to package.json:
{ "prettier": "@kjanat/prettier-config" }
Or create .prettierrc:
"@kjanat/prettier-config"
Create prettier.config.mjs:
import prettierConfig from "@kjanat/prettier-config";
export default { ...prettierConfig, semi: false, printWidth: 100 };
Or with TypeScript (prettier.config.ts):
import type { Config } from "prettier";
import prettierConfig from "@kjanat/prettier-config";
export default { ...prettierConfig, semi: false } satisfies Config;
{
objectWrap: "collapse",
experimentalTernaries: true,
overrides: [
// CSS, HTML, XML use tabs
{ files: ["*.css"], options: { useTabs: true } },
{ files: ["*.html"], options: { useTabs: true } },
// SVG uses HTML parser for better whitespace handling
{
files: ["*.svg"],
options: { parser: "html", htmlWhitespaceSensitivity: "ignore", useTabs: true }
},
// Markdown wraps at printWidth
{ files: ["*.md"], options: { proseWrap: "always" } },
// XML formatting
{
files: ["*.xml"],
options: {
parser: "xml",
useTabs: true,
singleAttributePerLine: true,
xmlSortAttributesByKey: true
}
}
]
}
Notable:
printWidth (override with
proseWrap: "preserve" if needed)Configure custom utility functions:
import prettierConfig from "@kjanat/prettier-config";
export default { ...prettierConfig, tailwindFunctions: ["cn", "clsx", "tw"] };
| Environment | Version | Support |
|---|---|---|
| Bun | ≥1.0.0 | ✅ |
| Node.js | ≥18.0.0 | ✅ |
Module System: ESM only
bun run build # Build package
bun typecheck # Type checking
bun run format # Format code
Plugins are peer dependencies. Install required plugins:
bun add -d @prettier/plugin-xml prettier-plugin-tailwindcss
"type": "module" to package.json.cjs extension for configmoduleResolution to "bundler" or "node16"Contributions welcome! Submit a PR:
MIT © kjanat
FAQs
Yet another Prettier config
The npm package @kjanat/prettier-config receives a total of 10 weekly downloads. As such, @kjanat/prettier-config popularity was classified as not popular.
We found that @kjanat/prettier-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.