tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
25 lines • 776 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeNoEval = void 0;
const mergeNoEval = (existingOptions, newOptions) => {
if (existingOptions === undefined && newOptions === undefined) {
return [];
}
let allowIndirect = true;
for (const options of [existingOptions, newOptions]) {
if (options === undefined ||
options.length === 0 ||
options[0].allowIndirect === undefined) {
allowIndirect = false;
break;
}
allowIndirect = allowIndirect && options[0].allowIndirect;
}
return [
{
...(allowIndirect && { allowIndirect }),
},
];
};
exports.mergeNoEval = mergeNoEval;
//# sourceMappingURL=no-eval.js.map