https://github.com/marko-js/prettier
A prettier plugin for parsing and printing Marko files.
https://github.com/marko-js/prettier
Last synced: 4 months ago
JSON representation
A prettier plugin for parsing and printing Marko files.
- Host: GitHub
- URL: https://github.com/marko-js/prettier
- Owner: marko-js
- License: mit
- Created: 2021-08-30T18:07:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-06T04:09:39.000Z (4 months ago)
- Last Synced: 2026-02-06T13:44:49.272Z (4 months ago)
- Language: Marko
- Size: 615 KB
- Stars: 12
- Watchers: 4
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
prettier-plugin-marko
> Note:
> For prettier@2 or below use `prettier-plugin-marko@2`.
A [Prettier](https://prettier.io/) plugin for parsing and printing Marko files.
# Installation
### npm
```console
npm install prettier prettier-plugin-marko -D
```
# Usage
See the Prettier ["using plugins"](https://prettier.io/docs/plugins#using-plugins) guide.
```console
npm exec -- prettier --write "**/*.marko" --plugin=prettier-plugin-marko
```
Or via [prettier configuration](https://prettier.io/docs/configuration) like:
```json
{
"plugins": ["prettier-plugin-marko"]
}
```
## Editors
Editors such as [VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) provide plugins for calling [Prettier](https://prettier.io/) directly from your editor.
# Options
On top of [Prettier's options](https://prettier.io/docs/en/options.html), there are a few additional options picked up by this plugin.
## `markoSyntax: "auto" | "html" | "concise"`
Marko supports both an [html like](https://markojs.com/docs/syntax/) and [concise](https://markojs.com/docs/concise/) syntaxes.
By default this plugin will try to detect the syntax you are already using and output a formatted document in that syntax.
You can overide the default (`"auto"`) to enforce that all templates are formatted to the syntax of your choosing.
# Code of Conduct
This project adheres to the [eBay Code of Conduct](./.github/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.