tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
26 lines • 917 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertInterfaceName = void 0;
const convertInterfaceName = (tslintRule) => {
return {
rules: [
{
ruleName: "@typescript-eslint/naming-convention",
...(tslintRule.ruleArguments.length !== 0 && {
rules: [
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: tslintRule.ruleArguments[0] === "always-prefix" ? true : false,
},
},
],
}),
},
],
};
};
exports.convertInterfaceName = convertInterfaceName;
//# sourceMappingURL=interface-name.js.map