Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
24 lines
1020 B
Plaintext
24 lines
1020 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://typescript-eslint.io/troubleshooting/typed-linting#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}`);
|
|
}
|
|
}
|
|
}
|