@incentro-ic/config-prettier
v3.0.1
Published
A shared Prettier configuration for formatting files.
Downloads
73
Readme
Incentro IC - Code Standards - Prettier
💫 Introduction
A shared Prettier configuration for formatting files. We use the base Prettier style (as mentioned in our code style) and add two plugins:
- Organize Imports - Sorts and cleans imports.
- Package.json - Sorts
package.jsonfiles.
💾 Installation
To install the package, use the following command:
pnpm add -D prettier @incentro-ic/config-prettier🪛 Usage
Create a Prettier configuration file and re-export this configuration:
export { default } from "@incentro-ic/config-prettier";Then, add a script to your package.json file to run Prettier:
{
"scripts": {
"format:prettier": "prettier --write . --cache",
"lint:prettier": "prettier --check . --cache"
}
}