Commit b9f50418 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] add notification for linting error

parent baad40b7
......@@ -84,6 +84,7 @@ module.exports = class Logger {
summary: _title,
body: _message,
icon: path.join(__dirname, 'SGC.svg'),
sound: 'message-new-instant'
}).push();
} else {
notifier.notify(
......
......@@ -194,7 +194,8 @@ module.exports = class Css extends Task {
configBasedir: `${process.cwd()}/sgc-core/`
}),
reporter({
clearReportedMessages: true
clearReportedMessages: true,
throwError: true
})
]).process(file, {
from: _input,
......@@ -202,7 +203,8 @@ module.exports = class Css extends Task {
}).then(() => {
resolve();
}).catch(error => {
this._logger.error(error.stack)
this._logger.displayNotification('SGC css:qa task', 'You have some linting-errors in your CSS. Please fix them!');
resolve();
});
});
}
......
......@@ -169,7 +169,9 @@ module.exports = class Js extends Task {
});
let formatter = cli.getFormatter();
let report = cli.executeOnFiles(_files);
if (report.errorCount > 0) {
this._logger.displayNotification('SGC js:qa task', 'You have some linting-errors in your JavaScript. Please fix them!');
}
console.log(formatter(report.results));
resolve();
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment