0.1.1 • Published 6 months ago

@benhigham/prettier-config v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@benhigham/prettier-config

npm version npm downloads License

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-config

Usage

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

License

This project is licensed under the MIT License.