@stackbit/prettier-config

1.2.0 • Public • Published

prettier-config NPM version

Stackbit's shareable config for Prettier

Installation

Install Prettier and @stackbit/prettier-config:

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

Usage

Stackbit's Prettier rules come bundled in @stackbit/prettier-config. To enable these rules, add a prettier property in your package.json. See the Prettier configuration docs for more details.

"prettier": "@stackbit/prettier-config"

If you don't want to use package.json, you can use any of the supported extensions to export a string:

// `.prettierrc.json`
"@stackbit/prettier-config"
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@stackbit/prettier-config';

Extending

This configuration is not intended to be changed, but if you have a setup where modification is required, it is possible. Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.

To extend a configuration you will need to use a prettier.config.js or .prettierrc.js file that exports an object:

module.exports = {
  ...require('@stackbit/prettier-config'),
  semi: false
};

Changelog

Changes are recorded in CHANGELOG.md.

License

Distributed under the MIT License. See LICENSE for more information.

Dependents (0)

Package Sidebar

Install

npm i @stackbit/prettier-config

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

4.84 kB

Total Files

5

Last publish

Collaborators

  • bwwhite
  • bob_netlify
  • noahcrowley-netlify
  • greglobinski
  • seancdavis
  • merlyn_at_netlify
  • cmparsons
  • suzanneaitchison
  • ryanbonial
  • stackbitjoe
  • arseny.gurevich
  • smnh
  • tomasb
  • rodikh
  • berdav
  • stackbit-admin
  • vitaliyr
  • denar90
  • youvalv