tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
19 lines • 831 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertPreferConditionalExpression = exports.PREFER_CONDITIONAL_EXPRESSION_NOTICE = void 0;
exports.PREFER_CONDITIONAL_EXPRESSION_NOTICE = "The eslint-plugin-unicorn only supports simple 'if-else' statements.";
const convertPreferConditionalExpression = (tslintRule) => {
return {
rules: [
{
...(tslintRule.ruleArguments.length !== 0 && {
notices: [exports.PREFER_CONDITIONAL_EXPRESSION_NOTICE],
}),
ruleName: "unicorn/prefer-ternary",
},
],
plugins: ["eslint-plugin-unicorn"],
};
};
exports.convertPreferConditionalExpression = convertPreferConditionalExpression;
//# sourceMappingURL=prefer-conditional-expression.js.map