tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
30 lines (29 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertNoInferrableTypes = void 0;
const convertNoInferrableTypes = (tslintRule) => {
return {
rules: [
{
ruleName: "@typescript-eslint/no-inferrable-types",
ruleArguments: tslintRule.ruleArguments.length
? tslintRule.ruleArguments.reduce(
(acc, arg) => {
switch (arg) {
case "ignore-params":
acc[0].ignoreParameters = true;
return acc;
case "ignore-properties":
acc[0].ignoreProperties = true;
return acc;
}
},
[{}],
)
: undefined,
},
],
};
};
exports.convertNoInferrableTypes = convertNoInferrableTypes;
//# sourceMappingURL=no-inferrable-types.js.map