UNPKG

tslint-to-eslint-config

Version:

Converts your TSLint configuration to the closest reasonable ESLint equivalent.

20 lines 830 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertArrowReturnShorthand = exports.ARROW_RETURN_NOTICE = void 0; exports.ARROW_RETURN_NOTICE = "ESLint will throw an error if the function body is multiline yet has a one-line return on it."; const convertArrowReturnShorthand = (tslintRule) => { return { rules: [ { ...(tslintRule.ruleArguments.length !== 0 && tslintRule.ruleArguments[0] === "multiline" && { ruleArguments: ["always"], }), ruleName: "arrow-body-style", notices: [exports.ARROW_RETURN_NOTICE], }, ], }; }; exports.convertArrowReturnShorthand = convertArrowReturnShorthand; //# sourceMappingURL=arrow-return-shorthand.js.map