Skip to content

hypetechdev/prettier-config

Repository files navigation

HypeTech - Prettier Configuration

The official HypeTech prettier configuration, part of Frontend Coding Standards.

Installation

The configuration can be installed via package manager.

With PNPM:

## Preferred way
pnpm add @hypetech/prettier-config -D

With Yarn:

yarn add -D @hypetech/prettier-config

With NPM:

npm install --dev @hypetech/prettier-config

To inform prettier of this configuration, you have to add the prettier property to your package.json file:

"prettier": "@hypetech/prettier-config"

Instead of manually editing your package.json, you can also utilize the npm pkg subcommand:

npm pkg set prettier=@hypetech/prettier-config

Extending

Prettier does not ship with a built-in way of extending configurations.

To extend the configuration, you will have to create a .prettierrc.js file (or .prettierrc.cjs if your package is a "type": "module") and import the HypeTech configuration using require:

module.exports = {
    ...require('@hypetech/prettier-config'),
    semi: true,
}

If you have previously added the configuration to your package.json, via the prettier property, you can now remove it. You can also utilize the npm pkg:

npm pkg delete prettier

About

Default Prettier Configuration

Resources

License

Stars

Watchers

Forks

Packages

No packages published