Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

best-prettier-config

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

best-prettier-config - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

.prettierrc.json

37

package.json
{
"name": "best-prettier-config",
"description": "The best prettier config in the world",
"version": "1.1.0",
"main": "index.json",
"bin": "cli.js",
"version": "2.0.0",
"bin": {
"best-prettier-config": "src/cli.ts"
},
"type": "module",
"files": [
"index.json",
"cli.js"
".prettierrc.json",
"src/"
],

@@ -14,12 +16,31 @@ "keywords": [

],
"author": "Mackie Underdown <macklinu@gmail.com>",
"author": "Mackie Underdown <macklinu@users.noreply.github.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/macklinu/best-prettier-config.git"
"url": "git+https://github.com/macklinu/best-prettier-config.git"
},
"homepage": "https://github.com/macklinu/best-prettier-config",
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "bun test",
"lint": "eslint src"
},
"dependencies": {
"minimist": "^1.2.8",
"zod": "^3.22.4"
},
"devDependencies": {
"prettier": "^1.15.2"
"@changesets/cli": "^2.26.2",
"@types/minimist": "^1.2.3",
"@types/node": "^20.8.6",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"bun-types": "^1.0.6",
"eslint": "^8.51.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^3"
}
}
# best-prettier-config
> The best [prettier][] config in the world
> 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.
```sh
bunx best-prettier-config
```
npx 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:

@@ -22,8 +24,23 @@

If you really need it, you can also require this module:
If you need to add a couple plugins, like working on an Astro project with Tailwind, you can use the `--plugin` command line argument:
```js
const config = require('best-prettier-config')
```sh
# 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:
```json
{
"jsxSingleQuote": true,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwind"]
}
```
[prettier]: https://github.com/prettier/prettier
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc