# sharec-prettier-hook

> Apply .prettier formatting for your configs

Latest version **1.0.0** (published 2022-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install sharec-prettier-hook
pnpm add sharec-prettier-hook
yarn add sharec-prettier-hook
bun add sharec-prettier-hook
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-04-20 |
| First published | 2022-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Konstantin Epishev |
| Maintainers | lamartire |

## Links

- npm: https://www.npmjs.com/package/sharec-prettier-hook
- Repository: https://github.com/sharecjs/sharec-prettier-hook
- Homepage: https://github.com/sharecjs/sharec-prettier-hook#readme
- Issues: https://github.com/sharecjs/sharec-prettier-hook/issues
- npm.io page: https://npm.io/package/sharec-prettier-hook

## Dependencies (2)

- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [prettier](https://npm.io/package/prettier.md) ^2.6.2

## Recent versions

- 1.0.0 (latest) — 2022-04-20

## README

# `sharec-prettier-hook`

<img src="https://raw.githubusercontent.com/lamartire/sharec/d91504a64409b3f3db531a7bca749295a3b20d92/packages/sharec-docs/static/images/logo-alt.svg" alt="Sharec logo by Ivashkina Xenia <xeniaowl112@mail.ru>" align="right" width="100">

[![.github/workflows/main.yml](https://github.com/sharecjs/sharec-prettier-hook/workflows/.github/workflows/main.yml/badge.svg)](https://github.com/sharecjs/sharec-prettier-hook/actions)
[![npm](https://img.shields.io/npm/v/sharec-prettier-hook)](https://npmjs.com/sharec-prettier-hook)
![MIT License](https://camo.githubusercontent.com/4481c7672053be9c676fbc983c040ca59fddfa19/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f6c6f6775782d70726f636573736f722e737667)

Allows to format your [sharec](https://github.com/sharecjs/sharec) configs with `prettier`.

## Usage

Install the hook:

```shell
npm i --save-dev sharec-prettier-hook
# or with yarn
yarn add -D sharec-prettier-hook
```

Create `.sharecrc.js` file in your project with following content:

```js
const perttierHook = require('sharec-prettier-hook')

module.exports = {
  afterMerge: perttierHook,
}
```

## How it works

The hook is looking for `prettier` config inside upcoming configs or inside a target project.

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