https://github.com/studiometa/prettier-formatter-gitlab
Send Prettier errors to Gitlab's Code Quality reports.
https://github.com/studiometa/prettier-formatter-gitlab
Last synced: 3 months ago
JSON representation
Send Prettier errors to Gitlab's Code Quality reports.
- Host: GitHub
- URL: https://github.com/studiometa/prettier-formatter-gitlab
- Owner: studiometa
- License: mit
- Created: 2020-10-22T10:23:59.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-11-24T19:55:17.000Z (7 months ago)
- Last Synced: 2025-11-28T07:47:36.561Z (7 months ago)
- Language: JavaScript
- Size: 537 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @studiometa/prettier-formatter-gitlab
[](https://www.npmjs.com/package/@studiometa/prettier-formatter-gitlab/)
[](https://www.npmjs.com/package/@studiometa/prettier-formatter-gitlab/)
[](https://bundlephobia.com/package/@studiometa/prettier-formatter-gitlab)
[](https://david-dm.org/studiometa/prettier-formatter-gitlab)

Send Prettier errors to Gitlab's Code Quality reports.
## Installation
Install the package with NPM:
```bash
npm install -D @studiometa/prettier-formatter-gitlab
```
## Usage
Prettier does not have an option for custom reporter, this package will run a prettier CLI command for you and parse its result to generate the Code Quality report.
```js
prettier-formatter-gitlab 'prettier -l src/'
```
The report file path will be read from the `PRETTIER_CODE_QUALITY_REPORT` environment variable or from the `.gitlab-ci.yml` configuration file when using the code quality report artifacts:
```yaml
# .gitlab-ci.yml
prettier:
image: node:20
script:
- npm ci
- npx prettier-formatter-gitlab 'prettier -l src/'
artifacts:
reports:
codequality: gl-codequality.json
```
## Notes
This project is heavily inspired and borrows some function to the [`eslint-formatter-gitlab`](https://gitlab.com/remcohaszing/eslint-formatter-gitlab) package.