This package contains shareable Prettier configuration used by the applications created with @shaizei/cli.
Using Yarn:
yarn add @shaizei/prettier-config --dev
Using npm:
npm install @shaizei/prettier-config --save-dev
- 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
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
}