A Prettier formatter for the GitLab Code Quality report
npm install @studiometa/prettier-formatter-gitlab



!Codecov
Send Prettier errors to Gitlab's Code Quality reports.
Install the package with NPM:
``bash`
npm install -D @studiometa/prettier-formatter-gitlab
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
This project is heavily inspired and borrows some function to the eslint-formatter-gitlab` package.