tslint-ban-snippets
Version:
A custom tslint rule to ban configurable lists of code snippets.
15 lines • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var GeneralRuleUtils;
(function (GeneralRuleUtils) {
function buildFailureString(message, ruleId) {
// include the rule ID, to make it easier to disable
return message + " (" + 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