tslint-ban-snippets
Version:
A custom tslint rule to ban configurable lists of code snippets.
16 lines • 722 B
JavaScript
;
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 = {}));
//# sourceMappingURL=GeneralRuleUtils.js.map