@s1mpson/prettier-config
v1.0.1
Published
Shareable Prettier config for my projects to produce neat and readable code
Downloads
13
Maintainers
Readme
prettier-config
Shareable Prettier config for my projects to produce neat and readable code
Highlights
- Prints single quotes instead of double quotes (including inside of JSX)
- Prints trailing commas where possible (excluding function parameters and calls)
- Prints single attribute per line in HTML, Vue and JSX
- Removes semicolons at the ends of statements
Install
First, you want to install this package as a dev dependency:
$ npm install -D @s1mpson/prettier-config
# or
$ yarn add -D @s1mpson/prettier-config
# or
$ pnpm add -D @s1mpson/prettier-config
# or
$ bun add -D @s1mpson/prettier-config
Usage
Now, you just need to reference this module as your Prettier configuration.
- You can do it by either adding
"prettier"
key in yourpackage.json
:
{
// ...
"prettier": "@s1mpson/prettier-config"
}
- Or by creating
.prettierrc
or.prettierrc.json
file with the name of this package as its only content:
"@s1mpson/prettier-config"
Voilà! You now have a working Prettier configuration!