# @veriff/prettier-config

> Shared prettier configuration.

Latest version **2.1.2** (published 2024-09-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @veriff/prettier-config
pnpm add @veriff/prettier-config
yarn add @veriff/prettier-config
bun add @veriff/prettier-config
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2024-09-26 |
| First published | 2022-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Veriff |
| Maintainers | hosseinamdveriff, ingmarliibert-veriff, mrholiday, kevingulj, janari_v, maksim.k.veriff, luis.barragan, madisp.veriff, fu-npmjs-cci |

## Links

- npm: https://www.npmjs.com/package/@veriff/prettier-config
- npm.io page: https://npm.io/package/@veriff/prettier-config

## Recent versions

- 2.1.2 (latest) — 2024-09-26
- 2.1.1 — 2024-09-26
- 2.1.0 — 2022-06-28

## README

# prettier-config

This package contains Prettier configuration that enforce code formatting conventions.

## Usage

At first, install `prettier` and the package:

```bash
npm i prettier @veriff/prettier-config --save-dev
```

To apply the configuration you need to add `prettier` to your project's dependencies and create a `.prettierrc.json`
file in the root with the following contents:

```json
"@veriff/prettier-config"
```

If you like to overrride any prettier options, create `.prettierrc.js` ([docs](https://prettier.io/docs/en/configuration.html#sharing-configurations)):

```js
module.exports = {
    ...require("@veriff/prettier-config"),
    //
    // any prettier option overrides -  https://prettier.io/docs/en/options.html
    //
    'printWidth': 150,
};
```

### With ESLint

Setting up just `eslint` with `@veriff/eslint-config` is recommended and usually enough. However, you still might prefer
to let `prettier` take care of formatting. In this case you need to adjust `eslint` configuration to avoid any possible
conflicts with `prettier`.

Ar first, install `eslint-config-prettier` to disable conflicting `eslint` rules:

```bash
npm i eslint-config-prettier --save-dev
```

Then extend your `eslint` configuration with it:

```json
{
  "extends": [
    "@veriff/eslint-config/<config-you-use>",
    "prettier"
  ]
}
```

This will disable all `eslint` rules that might conflict with prettier. It means that code formatting is now
on `prettier` and you should make sure it works on every commit and checks formatting on the CI.

More details on this approach you can find in
the [official prettier documentation](https://prettier.io/docs/en/integrating-with-linters.html).

### With Stylelint

Setting up just `stylelint` with `@veriff/stylelint-config` is recommended and usually enough. However, you still might
prefer to let `prettier` take care of formatting. In this case you need to adjust `stylelint` configuration to avoid any
possible conflicts with `prettier`.

Ar first, install `stylelint-config-prettier` to disable conflicting `stylelint` rules:

```bash
npm i stylelint-config-prettier --save-dev
```

Then extend your `stylelint` configuration with it:

```json
{
  "extends": [
    "@veriff/stylelint-config",
    "stylelint-config-prettier"
  ]
}
```

This will disable all `stylelint` rules that might conflict with `prettier`. It means that code formatting is now
on `prettier` and you should make sure it works on every commit and checks formatting on the CI.

More details on this approach you can find in
the [official prettier documentation](https://prettier.io/docs/en/integrating-with-linters.html).

---
_Source: https://npm.io/package/@veriff/prettier-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
