From ce5158e6e1c4bdebbf0eb07df31aae459d6d6de9 Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Fri, 31 May 2024 12:35:31 +0200 Subject: [PATCH 1/3] Bump version number --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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", From 315dcd33c39109b59b52e6256855bc3c79e817f3 Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Fri, 31 May 2024 12:37:35 +0200 Subject: [PATCH 2/3] Fix exit code on lint error --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) 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); + } }); } From 2cc20afdad5b7db2bf3a3527da2108a044bbcabe Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Fri, 31 May 2024 12:38:50 +0200 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) 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 🎉