My personal Prettier configuration, designed to enforce consistent code formatting across my JavaScript and TypeScript projects.
- Sensible defaults for modern JavaScript/TypeScript development
- Ensures consistent formatting across different IDEs and editors
- Optimized for readability and maintainability
- Compatible with Prettier v3
# npm
npm install --save-dev @benhigham/prettier-config
# yarn
yarn add --dev @benhigham/prettier-config
# pnpm
pnpm add --save-dev @benhigham/prettier-configIf you need to extend the configuration:
import benhighamPrettierConfig from '@benhigham/prettier-config';
/**
* @type {import('prettier').Config}
*/
const config = {
...benhighamPrettierConfig,
// your overrides here
};
export default config;"@benhigham/prettier-config"- Node.js 18.20.x or higher
- Prettier 3.x
This project is licensed under the MIT License.
{ // ... "prettier": "@benhigham/prettier-config", }