Shared Prettier configuration
This shared Prettier configuration changes some of the default options.
Integrate into new project
-
Install this package as a devDependency
# with Yarn $ yarn add -D @kapeta/prettier-config # with npm $ npm i -D @kapeta/prettier-config # with pnpm $ pnpm add -D @kapeta/prettier-config
-
Install peer dependencies of this package in your project as devDependencies
You can make use of the tool install-peerdeps:
# with Yarn $ yarn dlx install-peerdeps --dev @kapeta/prettier-config # with npm $ npx install-peerdeps --dev @kapeta/prettier-config # with pnpm $ pnpm dlx install-peerdeps --dev @kapeta/prettier-config
-
Use Prettier config in your project
Simply add the following line to your
package.json
file:"prettier": "@kapeta/prettier-config"`
Or alternatively create a
.prettierrc
file in project root with the following content:"@kapeta/prettier-config"