tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
26 lines (25 loc) • 755 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertIndent = void 0;
const convertIndent = (tslintRule) => {
let indentSize = 4; // @typescript-eslint/indent default
if (tslintRule.ruleArguments[0] === "tabs") {
indentSize = "tab";
} else if (tslintRule.ruleArguments[1] === 2) {
indentSize = 2;
}
return {
rules: [
{
ruleName: "indent",
ruleSeverity: "off",
},
{
ruleName: "@typescript-eslint/indent",
...(indentSize !== 4 && { ruleArguments: [indentSize] }),
},
],
};
};
exports.convertIndent = convertIndent;
//# sourceMappingURL=indent.js.map