This package is the prettier configuration for Leather
prettier
is used to auto format code in many language formats (js
, ts
, tsx
, md
, json
, yaml
).
- Install as a dev dependency in packages / apps:
pnpm install -D @leather.io/prettier-config
-
Add prettier configuration file:
// .prettierrc.js import defaultConfig from '@leather.io/prettier-config'; export default { ...defaultConfig };
-
Add prettier ignore patterns file:
# .prettierignore node_modules/ # Custom ignore patterns ...
-
Add prettier scripts:
// package.json "scripts": { "format": "prettier --write \"*.{js,jsx,ts,tsx}\"", ... }
-
Manual usage from command line:
npm run format