Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.06 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.06 KB

@shaizei/prettier-config

This package contains shareable Prettier configuration used by the applications created with @shaizei/cli.

Getting Started

1. Installation

Using Yarn:

  yarn add @shaizei/prettier-config --dev

Using npm:

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

2. Usage

  • Create a new file and name it as prettier.config.js
  • Just import @shaizei/prettier-config and export it.
module.exports = require('@shaizei/prettier-config');
  • In order to have a .prettierignore file as well, just run the following command from terminal:
  cat ./node_modules/@shaizei/prettier-config/.prettierignore >> .prettierignore

Override Default Config

If you want to override the default configuration, then add the following code in prettier.config.js file:

  const prettierConfig = require('@shaizei/prettier-config');
  module.exports = {
    ...prettierConfig,
    // your config options goes here, e.g. printWidth: 80
  }