Registry / testing / stylelint-formatter-gitlab-code-quality-report

stylelint-formatter-gitlab-code-quality-report

JSON →
library1.1.0jsnpmunverified

A custom formatter for Stylelint that outputs a GitLab Code Quality compatible report. Version 1.1.0 is the current stable release, with no regular release cadence documented. It requires Node.js >=18.12.0 and peer dependency stylelint >=16.0.0. Key differentiator: generates a JSON report compatible with GitLab's Code Quality feature, useful for CI pipelines. The package is a simple formatter with no significant alternatives that target GitLab specifically.

npm install stylelint-formatter-gitlab-code-quality-report
INSTALL
IMPORT
SIG · STYLELINT-FORMATTE
S
stylelint-formatter-gitlab-code-quality-report
testingjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import stylelintFormatter from 'stylelint-formatter-gitlab-code-quality-report'
const stylelintFormatter = require('stylelint-formatter-gitlab-code-quality-report')
This package does not export a default for programmatic use; it's intended for CLI usage via --custom-formatter.
formatter
stylelint --custom-formatter=node_modules/stylelint-formatter-gitlab-code-quality-report/index.js
stylelint --custom-formatter=stylelint-formatter-gitlab-code-quality-report
The formatter must be referenced by its full path relative to node_modules, not just the package name.
formatter
stylelint --custom-formatter=./node_modules/stylelint-formatter-gitlab-code-quality-report/index.js
stylelint --custom-formatter=stylelint-formatter-gitlab-code-quality-report/index.js
Path should be relative to current working directory, not just package name.

Install the formatter and generate a GitLab Code Quality JSON report for a CSS file.

npm install --save-dev stylelint stylelint-formatter-gitlab-code-quality-report # Check a CSS file and output GitLab Code Quality report stylelint --custom-formatter=./node_modules/stylelint-formatter-gitlab-code-quality-report/index.js file.css > gl-code-quality-report.json
Debug
Known issues
gotchaThe formatter file path must be absolute or relative to current directory; using just the package name may fail.
fix
Use ./node_modules/stylelint-formatter-gitlab-code-quality-report/index.js as the formatter path.
affects: >=1.0.0
gotchaRequires stylelint >=16.0.0 as a peer dependency; older stylelint versions may not work.
fix
Ensure stylelint version is 16.0.0 or higher.
affects: >=1.0.0
gotchaThe output is a JSON array of Code Quality issues; GitLab expects a specific schema, ensure compatibility.
fix
Validate output against GitLab Code Quality report format.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'stylelint-formatter-gitlab-code-quality-report'
Using just the package name in --custom-formatter without the full path.
fix
Use the full path: --custom-formatter=./node_modules/stylelint-formatter-gitlab-code-quality-report/index.js
Error: Unknown formatter option: stylelint-formatter-gitlab-code-quality-report
Incorrect CLI syntax; --custom-formatter requires a file path.
fix
Use --custom-formatter=<path> not --formatter.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
stylelint-formatter-gitlab-code-quality-report — npm install stylelint-formatter-gitlab-code-quality-report · libregistry