tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
25 lines (24 loc) • 744 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertSpaceWithinParens = void 0;
const convertSpaceWithinParens = (tslintRule) => {
let notices;
let arg;
if (tslintRule.ruleArguments.length === 1 && tslintRule.ruleArguments[0] !== 0) {
arg = "always";
notices = ["The number of spaces will be ignored"];
} else {
arg = "never";
}
return {
rules: [
{
...(notices !== undefined && { notices }),
ruleArguments: [arg],
ruleName: "space-in-parens",
},
],
};
};
exports.convertSpaceWithinParens = convertSpaceWithinParens;
//# sourceMappingURL=space-within-parens.js.map