diff --git a/src/modules/app/functions/lint-files.ts b/src/modules/app/functions/lint-files.ts index 84191d34..0edac356 100644 --- a/src/modules/app/functions/lint-files.ts +++ b/src/modules/app/functions/lint-files.ts @@ -216,5 +216,9 @@ export const lintFiles = async ( await outputFile(configuration.outputFile, errors, warnings); } + if (errors.length > 0) { + return 1; + } + return 0; }; diff --git a/src/modules/core/functions/lint.ts b/src/modules/core/functions/lint.ts index c7f7c9ce..81b71d68 100644 --- a/src/modules/core/functions/lint.ts +++ b/src/modules/core/functions/lint.ts @@ -199,4 +199,8 @@ export const lint = async ( if (configuration.outputFile) { await outputFile(configuration.outputFile, errors, warnings); } + + if (errors.length > 0) { + process.exit(1); + } };