# prettier-plugin-dot

> A prettier plugin for Graphviz Dot.

Latest version **0.4.1** (published 2023-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install prettier-plugin-dot
pnpm add prettier-plugin-dot
yarn add prettier-plugin-dot
bun add prettier-plugin-dot
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2023-05-05 |
| First published | 2021-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | kamiazya |
| Maintainers | kamiazya |
| Keywords | prettier, prettier-plugin, graphviz, graphviz-dot |

## Links

- npm: https://www.npmjs.com/package/prettier-plugin-dot
- Repository: https://github.com/ts-graphviz/prettier-plugin-dot
- Issues: https://github.com/ts-graphviz/prettier-plugin-dot/issues
- Funding: https://github.com/sponsors/kamiazya
- npm.io page: https://npm.io/package/prettier-plugin-dot

## Dependencies (1)

- [ts-graphviz](https://npm.io/package/ts-graphviz.md) ^1.3.2

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2023-05-05
- 0.4.0 — 2022-12-22
- 0.3.1 — 2021-10-26
- 0.3.0 — 2021-09-23
- 0.2.0 — 2021-07-17
- 0.1.2 — 2021-07-17
- 0.1.1 — 2021-07-17
- 0.1.0 — 2021-07-17

## README

[![NodeCI](https://github.com/ts-graphviz/prettier-plugin-dot/workflows/NodeCI/badge.svg)](https://github.com/ts-graphviz/prettier-plugin-dot/actions?workflow=NodeCI)
[![npm version](https://badge.fury.io/js/prettier-plugin-dot.svg)](https://badge.fury.io/js/prettier-plugin-dot)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg)](#contributors)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

# Prettier for Graphviz Dot

prettier-plugin-dot is a prettier plugin for Graphviz Dot.

Format your Dot using Prettier.

## How it works? 🤔

A Prettier plugin must first parse the source code of the target language into a traversable data structure (Usually an **A**bstract **S**yntax **T**ree)
and then print out that data structure in a "pretty" style.

The Graphviz Dot AST generated by [ts-graphviz](https://github.com/ts-graphviz/ts-graphviz) implemented in JavaScript using the [peggy](https://github.com/peggyjs/peggy).
What this means is that unlike many other prettier plugins, prettier-plugin-dot has no additional runtime pre-requisites (e.g: Python executable). It could even be used inside a browser.

## Getting started ✨

If you're using the npm or yarn CLI, then add the plugin by:

[![NPM](https://nodei.co/npm/prettier-plugin-dot.png)](https://nodei.co/npm/prettier-plugin-dot/)

```bash
# yarn
$ yarn add -D prettier prettier-plugin-dot
# or npm
$ npm install --save-dev prettier prettier-plugin-dot
```

The prettier executable is now installed and ready for use:

```bash
$ yarn run prettier --write '**/*.dot'
# or
$ npx prettier --write '**/*.dot'
```

## Example 📑

### Input ⬅️

```dot
digraph G {Hello->World}
```

### Output ➡️

```dot
digraph G {
  Hello -> World;
}
```

## Related Projects 💫

Related projects can be found at [**ts-graphviz** GitHub Organization](https://github.com/ts-graphviz).

The TypeScript/JavaScript ecosystem provides a variety of OSS with the goal of making Graphviz more connected and easier to use.

## Contributors 👥

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tr>⚖️
    <td align="center"><a href="http://blog.kamiazya.tech/"><img src="https://avatars.githubusercontent.com/u/35218186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yuki Yamazaki</b></sub></a><br /><a href="https://github.com/ts-graphviz/prettier-plugin-dot/commits?author=kamiazya" title="Documentation">📖</a> <a href="https://github.com/ts-graphviz/prettier-plugin-dot/commits?author=kamiazya" title="Tests">⚠️</a> <a href="https://github.com/ts-graphviz/prettier-plugin-dot/commits?author=kamiazya" title="Code">💻</a></td>
    <td align="center"><a href="https://thewilkybarkid.dev"><img src="https://avatars.githubusercontent.com/u/1784740?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chris Wilkinson</b></sub></a><br /><a href="https://github.com/ts-graphviz/prettier-plugin-dot/issues?q=author%3Athewilkybarkid" title="Bug reports">🐛</a></td>
    <td align="center"><a href="http://safareli.github.io/resume/"><img src="https://avatars.githubusercontent.com/u/1932383?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Irakli Safareli</b></sub></a><br /><a href="#ideas-safareli" title="Ideas, Planning, & Feedback">🤔</a></td>
  </tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## How to Contribute 💪

The easiest way to contribute is to use the library and star [repository](https://github.com/ts-graphviz/prettier-plugin-dot).

### Questions 💭

Feel free to ask questions on [GitHub Discussions](https://github.com/ts-graphviz/prettier-plugin-dot/discussions).

### Report bugs / request additional features 💡

Please register at [GitHub Issues](https://github.com/ts-graphviz/prettier-plugin-dot/issues/new/choose).

### Development / Bug Fixes 🧑‍💻

See [CONTRIBUTING.md](https://github.com/ts-graphviz/prettier-plugin-dot/blob/main/CONTRIBUTING.md).

### Financial Support 💸

Please support core member [kamiazya](https://github.com/sponsors/kamiazya).

> **Note** Even just a dollar is enough motivation for me to develop 😊

## License ⚖️

This software is released under the MIT License, see [LICENSE](./LICENSE).

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