epiphany/node_modules/stylelint/lib/utils/noFilesFoundError.js
2023-12-09 22:48:07 -08:00

20 lines
400 B
JavaScript

'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;