0.1.1 • Published 6 months ago
@benhigham/prettier-config v0.1.1
@benhigham/prettier-config
My personal Prettier configuration, designed to enforce consistent code formatting across my JavaScript and TypeScript projects.
Features
- Sensible defaults for modern JavaScript/TypeScript development
- Ensures consistent formatting across different IDEs and editors
- Optimized for readability and maintainability
- Compatible with Prettier v3
Installation
# npm
npm install --save-dev @benhigham/prettier-config
# yarn
yarn add --dev @benhigham/prettier-config
# pnpm
pnpm add --save-dev @benhigham/prettier-configUsage
Method 1: Use in package.json (recommended)
{
// ...
"prettier": "@benhigham/prettier-config",
}Method 2: Use in prettier.config.js
If 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;Method 3: Use in .prettierrc
"@benhigham/prettier-config"Requirements
- Node.js 18.20.x or higher
- Prettier 3.x
License
This project is licensed under the MIT License.