securityos/node_modules/stylelint/lib/utils/noFilesFoundError.js

21 lines
400 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
class NoFilesFoundError extends Error {
/**
* @param {string|string[]} fileList
*/
constructor(fileList) {
super();
if (typeof fileList === 'string') {
fileList = [fileList];
}
const pattern = fileList.filter((i) => !i.startsWith('!')).join(', ');
this.message = `No files matching the pattern "${pattern}" were found.`;
}
}
module.exports = NoFilesFoundError;