Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/converters/lintConfigs/rules/ruleConverters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ import { convertPipePrefix } from "./ruleConverters/codelyzer/pipe-prefix";
import { convertPreferOnPushComponentChangeDetection } from "./ruleConverters/codelyzer/prefer-on-push-component-change-detection";
import { convertPreferOutputReadonly } from "./ruleConverters/codelyzer/prefer-output-readonly";
import { convertRelativeUrlPrefix } from "./ruleConverters/codelyzer/relative-url-prefix";
import { convertTemplateClickEventsHaveKeyEvents } from "./ruleConverters/codelyzer/template-click-events-have-key-events";
import { convertTemplateAccessibilityTabindexNoPositive } from "./ruleConverters/codelyzer/template-accessibility-tabindex-no-positive";
import { convertTemplateBananaInBox } from "./ruleConverters/codelyzer/template-banana-in-box";
import { convertTemplateCyclomaticComplexity } from "./ruleConverters/codelyzer/template-cyclomatic-complexity";
Expand Down Expand Up @@ -371,6 +372,7 @@ export const ruleConverters = new Map([
["space-within-parens", convertSpaceWithinParens],
["strict-boolean-expressions", convertStrictBooleanExpressions],
["switch-default", convertSwitchDefault],
["template-click-events-have-key-events", convertTemplateClickEventsHaveKeyEvents],
["template-accessibility-tabindex-no-positive", convertTemplateAccessibilityTabindexNoPositive],
["template-banana-in-box", convertTemplateBananaInBox],
["template-cyclomatic-complexity", convertTemplateCyclomaticComplexity],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { RuleConverter } from "../../ruleConverter";

export const convertTemplateClickEventsHaveKeyEvents: RuleConverter = () => {
return {
rules: [
{
ruleName: "@angular-eslint/template/click-events-have-key-events",
},
],
plugins: ["@angular-eslint/eslint-plugin-template"],
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { convertTemplateClickEventsHaveKeyEvents } from "../template-click-events-have-key-events";

describe(convertTemplateClickEventsHaveKeyEvents, () => {
test("conversion without arguments", () => {
const result = convertTemplateClickEventsHaveKeyEvents({
ruleArguments: [],
});

expect(result).toEqual({
rules: [
{
ruleName: "@angular-eslint/template/click-events-have-key-events",
},
],
plugins: ["@angular-eslint/eslint-plugin-template"],
});
});
});