https://github.com/studiometa/stylelint-formatter-gitlab
https://github.com/studiometa/stylelint-formatter-gitlab
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/studiometa/stylelint-formatter-gitlab
- Owner: studiometa
- License: mit
- Created: 2024-05-31T08:56:18.000Z (about 2 years ago)
- Default Branch: develop
- Last Pushed: 2026-02-28T08:41:44.000Z (4 months ago)
- Last Synced: 2026-02-28T14:07:14.879Z (4 months ago)
- Language: JavaScript
- Size: 341 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @studiometa/stylelint-formatter-gitlab
[](https://www.npmjs.com/package/@studiometa/stylelint-formatter-gitlab/)
[](https://www.npmjs.com/package/@studiometa/stylelint-formatter-gitlab/)
[](https://bundlephobia.com/package/@studiometa/stylelint-formatter-gitlab)
[](https://david-dm.org/studiometa/stylelint-formatter-gitlab)
> Format StyleLint errors for Gitlab Code Quality reports.
## Installation
Install the package with NPM:
```bash
npm install -D stylelint@16 @studiometa/stylelint-formatter-gitlab
```
## Usage
Define a GitLab job to run `stylelint`.
_.gitlab-ci.yml_:
```yaml
stylelint:
image: node
script:
- npm ci
- npx stylelint --custom-formatter=@studiometa/stylelint-formatter-gitlab .
artifacts:
reports:
codequality: gl-codequality.json
```
The formatter will automatically detect a GitLab CI environment. It will detect where to output the
code quality report based on the GitLab configuration file.
## Configuration Options
StyleLint formatters don’t take any configuration options. In order to still allow some way of
configuration, options are passed using environment variables.
| Environment Variable | Description |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `STYLELINT_CODE_QUALITY_REPORT` | The location to store the code quality report. By default it will detect the location of the codequality artifact defined in the GitLab CI configuration file. |
| `STYLELINT_FORMATTER` | The Stylelint formatter to use for the console output. This defaults to string, the default Stylelint formatter. |
## Notes
This project is based on the [`stylelint-formatter-gitlab`](https://gitlab.com/leon0399/stylelint-formatter-gitlab) package which seems unmaintained and does not support StyleLint v16.