@webb/config-prettier
TypeScript icon, indicating that this package has built-in type declarations

2021.5.28 • Public • Published

@webb/config-prettier

Opinionated Prettier configuration

Install

# Install this module, with Prettier
$ npm i @webb/config-prettier prettier -D

Usage

Add this line to your package.json file:

"prettier": "@webb/config-prettier"

And then in your scripts block:

// This example is processing JavaScript and TypeScript files
// in the "dist" folder. Update these paths for your project.
"pretty": "prettier --write 'dist/**/*.js' 'dist/**/*.ts'"

You can find more CLI parameters here.

It's a good idea to run Prettier in a precommit script, like so:

// This example runs a "build" script, the "pretty" script
// we created above, an "increment" script to update the
// version parameter of "package.json", and finally stages
// all the changes for committing to git.
//
// Note that this example requires the installation of Husky.
"pre-commit": "npm run build && npm run pretty && npm run increment && git add -A :/"

Readme

Keywords

none

Package Sidebar

Install

npm i @webb/config-prettier

Weekly Downloads

1

Version

2021.5.28

License

MIT

Unpacked Size

3.52 kB

Total Files

6

Last publish

Collaborators

  • netoperatorwibby