UNPKG

strict-tslint-config

Version:

An opinionated TSLint configuration preset. Works best together with strict TypeScript settings and Prettier.

13 lines (12 loc) 452 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = require("path"); const tslint_1 = require("tslint"); function findRuleMetadata(ruleName) { const rule = tslint_1.findRule(ruleName, path_1.join(path_1.dirname(require.resolve('tslint')), 'rules')); if (!rule) { throw new Error(`Couldn't find rule '${ruleName}'.`); } return rule.metadata; } exports.findRuleMetadata = findRuleMetadata;