@schul-cloud/prettier-config
v1.0.0
Published
This package contains shareable Prettier configuration used by the applications created @schul-cloud.
Downloads
1
Readme
@schul-cloud/prettier-config
Getting Started
1. Installation
Using npm:
npm install @schul-cloud/prettier-config --save-dev
Using Yarn:
yarn add @schul-cloud/prettier-config --dev
2. Usage
- Create a new file and name it as
prettier.config.js
- Just import
@schul-cloud/prettier-config
and export it.
module.exports = require('@schul-cloud/prettier-config');
- In order to have a
.prettierignore
file as well, just run the following command from terminal:
cat ./node_modules/@schul-cloud/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('@schul-cloud/prettier-config');
module.exports = {
...prettierConfig,
// your config options goes here, e.g. printWidth: 80
}