UNPKG

tslint-folders

Version:

Custom TSLint rules for checking imports between packages and their folders, and generating relevant diagrams.

16 lines (15 loc) 678 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeneralRuleUtils = void 0; var GeneralRuleUtils; (function (GeneralRuleUtils) { function buildFailureString(message, ruleId) { // include the rule ID, to make it easier to disable return "".concat(message, " (").concat(ruleId, ")"); } GeneralRuleUtils.buildFailureString = buildFailureString; function isFileInPaths(filePath, paths) { return paths.some(function (path) { return filePath.indexOf(path) >= 0; }); } GeneralRuleUtils.isFileInPaths = isFileInPaths; })(GeneralRuleUtils = exports.GeneralRuleUtils || (exports.GeneralRuleUtils = {}));