1.0.3 • Published 1 year ago

@miorso/prettier-config v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@miorso/prettier-config

Shared Prettier configuration for consistent code formatting across projects.

Install

npm install --save-dev @miorso/prettier-config

Configuration

The following table lists the specific Prettier options this package changes:

OptionValueDescription
printWidth120Wrap lines exceeding 120 characters.
useTabstrueUse tabs instead of spaces for indentation.
singleQuotetrueUse single quotes instead of double quotes.

Usage

Create a .prettierrc file in your project and extend the configuration:

"@miorso/prettier-config"

Alternatively, you can add it to your package.json:

{
	"prettier": "@miorso/prettier-config"
}

Extending the Configuration

If you need to customize specific Prettier options while still using the shared base configuration, you can extend it programmatically by creating a .prettierrc.mjs file:

import baseConfig from '@miorso/prettier-config';

/** @type {import("prettier").Config} */
const config = {
	...baseConfig,
	semi: false,
};

export default config;

💡 For detailed Prettier documentation, visit Prettier's official site.

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago