UNPKG

tslint-to-eslint-config

Version:

Converts your TSLint configuration to the closest reasonable ESLint equivalent.

25 lines 801 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mergeLintConfigurations = void 0; const mergeLintConfigurations = (eslint, tslint) => { var _a; if (eslint instanceof Error) { return tslint; } const mappedConfig = (_a = eslint.full.rules) === null || _a === void 0 ? void 0 : _a["@typescript-eslint/tslint/config"]; if (!(mappedConfig instanceof Array) || mappedConfig[0] === "off") { return tslint; } return { ...tslint, full: { ...tslint.full, rules: { ...tslint.full.rules, ...mappedConfig[1].rules, }, }, }; }; exports.mergeLintConfigurations = mergeLintConfigurations; //# sourceMappingURL=mergeLintConfigurations.js.map