@yandeu/prettier-config
npm i -D @yandeu/prettier-config
// .prettierrc
"@yandeu/prettier-config"
// package.json
"scripts": {
"format:check": "prettier --check src",
"format": "prettier --write src"
}
Configuration
// .prettierrc.cjs (instead of .prettierrc)
module.exports = {
...require('@yandeu/prettier-config')
// my options
}
GitHub Actions
- name: Run Prettier
run: npm run format
Integrating with ESLint
Install @yandeu/eslint-config.
VSCode
Using VSCode? Install the Prettier Extension.