diff --git a/CHANGELOG.md b/CHANGELOG.md index daaeee2..28842c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## v0.0.1 - 2024-05-31 + +### Fixed + +- Fix exit code on lint error ([315dcd3](https://github.com/studiometa/stylelint-formatter-gitlab/commit/315dcd3)) + ## v0.0.0 - 2024-05-31 First release 🎉 diff --git a/package-lock.json b/package-lock.json index b3672da..0b1e06e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@studiometa/stylelint-formatter-gitlab", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@studiometa/stylelint-formatter-gitlab", - "version": "0.0.0", + "version": "0.0.1", "license": "MIT", "dependencies": { "chalk": "^5.3.0", diff --git a/package.json b/package.json index 3347ea5..6d22a57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/stylelint-formatter-gitlab", - "version": "0.0.0", + "version": "0.0.1", "description": "A StyleLint formatter for the GitLab Code Quality report", "main": "src/index.js", "type": "module", diff --git a/src/index.js b/src/index.js index fb3ab4a..2a7a73e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ import { writeFileSync } from 'node:fs'; +import { exit } from 'node:process'; import stylelint from 'stylelint'; import { getOutputPath, convert, getEnv } from './utils.js'; @@ -20,5 +21,8 @@ export default function gitlabFormatter(results, returnValue) { stylelint.formatters[STYLELINT_FORMATTER].then((fallbackFormatter) => { console.log(fallbackFormatter(results, returnValue)); + if (returnValue.errored) { + exit(1); + } }); }