UNPKG

tslint-to-eslint-config

Version:

Converts your TSLint configuration to the closest reasonable ESLint equivalent.

19 lines (18 loc) 673 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertRule = void 0; const conversionError_1 = require("../../../errors/conversionError"); const convertRule = (tslintRule, converters) => { const converter = converters.get(tslintRule.ruleName); if (converter === undefined) { return undefined; } try { return converter(tslintRule); } catch (error) { // TODO: Maybe we can provide a different error message for generic errors. return conversionError_1.ConversionError.forRuleError(error, tslintRule); } }; exports.convertRule = convertRule; //# sourceMappingURL=convertRule.js.map