@mheob/prettier-config
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

My personal Prettier config

To make my configurations a bit easier I share my Prettier config.

Install

With NPM

npm install -D @mheob/prettier-config

With YARN

yarn add -D @mheob/prettier-config

With PNPM

pnpm add -D @mheob/prettier-config

Usage

If you need to override some settings you can do it this way:

// .prettierrc.cjs
/** @type {import('prettier').Config} */
module.exports = {
	...require('@mheob/prettier-config'),
	semi: false,
	useTabs: false,
};

Ruleset

This configuration uses these styles:

/** @type {import('prettier').Config} */
module.exports = {
	arrowParens: 'always',
	endOfLine: 'lf',
	printWidth: 100,
	proseWrap: 'always',
	singleQuote: true,
	semi: true,
	trailingComma: 'all',
	useTabs: true,

	overrides: [
		{
			files: '*.{yaml,yml}',
			options: {
				printWidth: 130,
				singleQuote: false,
				useTabs: false,
			},
		},
		{
			files: '*.md',
			options: {
				printWidth: 130,
			},
		},
	],
};

Readme

Keywords

Package Sidebar

Install

npm i @mheob/prettier-config

Weekly Downloads

34

Version

3.2.0

License

MIT

Unpacked Size

3.84 kB

Total Files

5

Last publish

Collaborators

  • mheob