1.0.2 • Published 2 months ago

@studiometa/stylelint-formatter-gitlab v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@studiometa/stylelint-formatter-gitlab

NPM Version Downloads Size Dependency Status

Format StyleLint errors for Gitlab Code Quality reports.

Installation

Install the package with NPM:

npm install -D stylelint@16 @studiometa/stylelint-formatter-gitlab

Usage

Define a GitLab job to run stylelint.

.gitlab-ci.yml:

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 VariableDescription
STYLELINT_CODE_QUALITY_REPORTThe 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_FORMATTERThe 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 package which seems unmaintained and does not support StyleLint v16.

1.0.2

2 months ago

0.0.1

1 year ago

0.0.0

1 year ago