From f54cddd4a702f3913e0c9247ec8d0a6e97e31cce Mon Sep 17 00:00:00 2001 From: KingDarBoja Date: Sat, 9 May 2020 16:27:05 -0500 Subject: [PATCH] Add codelyzer no-input-rename converter --- .../converters/codelyzer/no-input-rename.ts | 12 ++++++++++++ .../codelyzer/tests/no-input-rename.test.ts | 18 ++++++++++++++++++ src/rules/rulesConverters.ts | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 src/rules/converters/codelyzer/no-input-rename.ts create mode 100644 src/rules/converters/codelyzer/tests/no-input-rename.test.ts diff --git a/src/rules/converters/codelyzer/no-input-rename.ts b/src/rules/converters/codelyzer/no-input-rename.ts new file mode 100644 index 000000000..9f0d9c311 --- /dev/null +++ b/src/rules/converters/codelyzer/no-input-rename.ts @@ -0,0 +1,12 @@ +import { RuleConverter } from "../../converter"; + +export const convertNoInputRename: RuleConverter = () => { + return { + rules: [ + { + ruleName: "@angular-eslint/no-input-rename", + }, + ], + plugins: ["@angular-eslint/eslint-plugin"], + }; +}; diff --git a/src/rules/converters/codelyzer/tests/no-input-rename.test.ts b/src/rules/converters/codelyzer/tests/no-input-rename.test.ts new file mode 100644 index 000000000..ce93c2070 --- /dev/null +++ b/src/rules/converters/codelyzer/tests/no-input-rename.test.ts @@ -0,0 +1,18 @@ +import { convertNoInputRename } from "../no-input-rename"; + +describe(convertNoInputRename, () => { + test("conversion without arguments", () => { + const result = convertNoInputRename({ + ruleArguments: [], + }); + + expect(result).toEqual({ + rules: [ + { + ruleName: "@angular-eslint/no-input-rename", + }, + ], + plugins: ["@angular-eslint/eslint-plugin"], + }); + }); +}); diff --git a/src/rules/rulesConverters.ts b/src/rules/rulesConverters.ts index 8cf684e8b..58c2b8de9 100644 --- a/src/rules/rulesConverters.ts +++ b/src/rules/rulesConverters.ts @@ -148,6 +148,7 @@ import { convertNoAttributeDecorator } from "./converters/codelyzer/no-attribute import { convertUsePipeDecorator } from "./converters/codelyzer/use-pipe-decorator"; import { convertNoForwardRef } from "./converters/codelyzer/no-forward-ref"; import { convertNoHostMetadataProperty } from "./converters/codelyzer/no-host-metadata-property"; +import { convertNoInputRename } from "./converters/codelyzer/no-input-rename"; /** * Keys TSLint rule names to their ESLint rule converters. @@ -226,6 +227,7 @@ export const rulesConverters = new Map([ ["no-implicit-dependencies", convertNoImplicitDependencies], ["no-import-side-effect", convertNoImportSideEffect], ["no-inferrable-types", convertNoInferrableTypes], + ["no-input-rename", convertNoInputRename], ["no-internal-module", convertNoInternalModule], ["no-invalid-regexp", convertNoInvalidRegexp], ["no-invalid-template-strings", convertNoInvalidTemplateStrings],