This package has been deprecated

Author message:

Renamed to @twostoryrobot/prettier-config

@twostoryrobot/prettier

2.0.0 • Public • Published

npm (scoped)

2SR prettier

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

Usage

npm install --save-dev @twostoryrobot/prettier

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

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

Or if you want to override the default at all (Note: please consider making a PR if you think the override will be useful for other projects).

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

Make sure to install the peer dependencies

npm install --save-dev prettier

Scripts

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 '**/*.js'"
}

Hooks

If you install husky you can invoke prettier as a hook for various actions (precommit, prepush, etc)

 "husky": {
    "hooks": {
      "pre-commit": "prettier --list-different '**/*.js'"
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @twostoryrobot/prettier

Weekly Downloads

8

Version

2.0.0

License

MIT

Unpacked Size

1.91 kB

Total Files

3

Last publish

Collaborators

  • calebissharp
  • jonotron
  • chrisfosterelli
  • avvaikethees