You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
378 B
19 lines
378 B
'use strict';
|
|
|
|
function isEslintError (e) {
|
|
return e.originalStack
|
|
.some(stackframe => stackframe.fileName && stackframe.fileName.indexOf('eslint-loader') > 0);
|
|
}
|
|
|
|
function transform(error) {
|
|
if (isEslintError(error)) {
|
|
return Object.assign({}, error, {
|
|
name: 'Lint error',
|
|
type: 'lint-error',
|
|
});
|
|
}
|
|
|
|
return error;
|
|
}
|
|
|
|
module.exports = transform;
|
|
|