Files
memecoin-botV2/.pnpm-store/v10/files/3b/9a034401e51d1f465ffed56030c4e8d8de9b4edc3c309b4dd8371d01b4584953c6aa5d45595b70355bd9afc90446ae7939843b3539e1be3368cda3223b7f57

24 lines
982 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = void 0;
exports.validateDefaultProjectForFilesGlob = validateDefaultProjectForFilesGlob;
exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = `
Having many files run with the default project is known to cause performance issues and slow down linting.
See https://tseslint.com/allowdefaultproject-glob-too-wide
`;
function validateDefaultProjectForFilesGlob(allowDefaultProject) {
if (!allowDefaultProject?.length) {
return;
}
for (const glob of allowDefaultProject) {
if (glob === '*') {
throw new Error(`allowDefaultProject contains the overly wide '*'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`);
}
if (glob.includes('**')) {
throw new Error(`allowDefaultProject glob '${glob}' contains a disallowed '**'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`);
}
}
}