pyk's personal Prettier configuration.
Use the following command to install @pyk/prettier-config
:
# npm
npm install --save-dev --save-exact prettier @pyk/prettier-config@latest
# pnpm
pnpm add --save-dev --save-exact prettier @pyk/prettier-config@latest
Add the following fields in your package.json
:
{
"scripts": {
"prettier:check": "prettier --check ."
"prettier:write": "prettier --write ."
},
"prettier": "@pyk/prettier-config"
}
Note You can ignore files by adding it to
.prettierignore
.
Then you can use pnpm prettier:check
or npm run prettier:check
to check the
file formatting.
Clone the repo:
git clone git@github.com:pyk/prettier-config.git
cd prettier-config/
Install the dependencies:
pnpm install
Publish the package:
pnpm publish --tag latest