2.0.2 • Published 7 months ago

best-prettier-config v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 months ago

best-prettier-config

The best prettier config in the world :earth_americas:

I add this file to all my projects, so I made a CLI to make it easier to do so.

bunx best-prettier-config

Note: As of v2, I use Bun to execute one-off scripts, so this module is only supported for usage with bunx. I try to keep APIs compatiable with Node and npx but it's not guaranteed.

This will write a .prettierrc file with the following contents to your current working directory:

{
  "jsxSingleQuote": true,
  "semi": false,
  "singleQuote": true,
  "trailingComma": "es5"
}

If you need to add a couple plugins, like working on an Astro project with Tailwind, you can use the --plugin command line argument:

# These are all the same
bunx best-prettier-config --plugin prettier-plugin-astro --plugin prettier-plugin-tailwind
bunx best-prettier-config --plugin astro --plugin tailwind
bunx best-prettier-config -p astro -p tailwind

Example output:

{
  "jsxSingleQuote": true,
  "semi": false,
  "singleQuote": true,
  "trailingComma": "es5",
  "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwind"]
}
2.0.2

7 months ago

2.0.1

7 months ago

2.0.0

7 months ago

1.1.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago