Skip to content

Commit

Permalink
feat: add stylelint prefix to CLI output
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed May 20, 2022
1 parent e93934c commit 4189012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/StylelintError.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class StylelintError extends Error {
* @param {string=} messages
*/
constructor(messages) {
super(messages);
super(`[stylelint] ${messages}`);
this.name = 'StylelintError';
this.stack = '';
}
Expand Down
3 changes: 2 additions & 1 deletion src/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default function linter(key, options, compilation) {
}
rawResults.push(
lintFiles(files).catch((e) => {
compilation.errors.push(e);
// @ts-ignore
compilation.errors.push(new StylelintError(e.message));
return [];
})
);
Expand Down

0 comments on commit 4189012

Please sign in to comment.