@twostoryrobot/prettier-config

5.0.0 • Public • Published

npm (scoped)

TSR prettier

Get pretty code with prettier the way Two Story Robot likes it.

Usage

npm install --save-dev @twostoryrobot/prettier-config

Then you can source the config from your own .prettierrc.js.

module.exports = require('@twostoryrobot/prettier-config')

Now you can add a script to your project's package.json that calls prettier and it will reference the config file in the root of your project directory.

"scripts": {
  "prettier": "prettier --write 'src/**/*.js'",
  "prettier-check": "prettier --list-different 'src/**/*.js'"
}

Custom configuration

If you want to override the defaults at all, use this method:

const prettierConfig = require('@twostoryrobot/prettier-config')
module.exports = Object.assign({}, prettierConfig, { semi: true })

Note: please consider making a PR if you think the override will be useful for other projects.

Readme

Keywords

none

Package Sidebar

Install

npm i @twostoryrobot/prettier-config

Weekly Downloads

177

Version

5.0.0

License

MIT

Unpacked Size

2.8 kB

Total Files

4

Last publish

Collaborators

  • calebissharp
  • jonotron
  • chrisfosterelli
  • avvaikethees