tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
26 lines • 1.01 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