diff --git a/src/converters/lintConfigs/rules/ruleConverters.ts b/src/converters/lintConfigs/rules/ruleConverters.ts index e2688056c..f92dbc340 100644 --- a/src/converters/lintConfigs/rules/ruleConverters.ts +++ b/src/converters/lintConfigs/rules/ruleConverters.ts @@ -262,6 +262,7 @@ import { convertReactA11yLang } from "./ruleConverters/react-a11y-lang"; import { convertReactA11yProps } from "./ruleConverters/react-a11y-props"; import { convertReactA11yRole } from "./ruleConverters/react-a11y-role"; import { convertReactA11yRoleHasRequiredAriaProps } from "./ruleConverters/react-a11y-role-has-required-aria-props"; +import { convertReactA11yRoleSupportsAriaProps } from "./ruleConverters/react-a11y-role-supports-aria-props"; import { convertReactA11yTabIndexNoPositive } from "./ruleConverters/react-a11y-tabindex-no-positive"; import { convertReactNoDangerousHtml } from "./ruleConverters/react-no-dangerous-html"; import { convertReactTsxCurlySpacing } from "./ruleConverters/react-tsx-curly-spacing"; @@ -506,6 +507,7 @@ export const ruleConverters = new Map([ ["react-a11y-lang", convertReactA11yLang], ["react-a11y-props", convertReactA11yProps], ["react-a11y-role-has-required-aria-props", convertReactA11yRoleHasRequiredAriaProps], + ["react-a11y-role-supports-aria-props", convertReactA11yRoleSupportsAriaProps], ["react-a11y-role", convertReactA11yRole], ["react-a11y-tabindex-no-positive", convertReactA11yTabIndexNoPositive], ["react-no-dangerous-html", convertReactNoDangerousHtml], diff --git a/src/converters/lintConfigs/rules/ruleConverters/react-a11y-role-supports-aria-props.ts b/src/converters/lintConfigs/rules/ruleConverters/react-a11y-role-supports-aria-props.ts new file mode 100644 index 000000000..28c30ba11 --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/react-a11y-role-supports-aria-props.ts @@ -0,0 +1,12 @@ +import { RuleConverter } from "../ruleConverter"; + +export const convertReactA11yRoleSupportsAriaProps: RuleConverter = () => { + return { + plugins: ["jsx-a11y"], + rules: [ + { + ruleName: "jsx-a11y/role-supports-aria-props", + }, + ], + }; +}; diff --git a/src/converters/lintConfigs/rules/ruleConverters/tests/react-a11y-role-supports-aria-props.test.ts b/src/converters/lintConfigs/rules/ruleConverters/tests/react-a11y-role-supports-aria-props.test.ts new file mode 100644 index 000000000..07ae12248 --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/tests/react-a11y-role-supports-aria-props.test.ts @@ -0,0 +1,18 @@ +import { convertReactA11yRoleSupportsAriaProps } from "../react-a11y-role-supports-aria-props"; + +describe(convertReactA11yRoleSupportsAriaProps, () => { + test("conversion without arguments", () => { + const result = convertReactA11yRoleSupportsAriaProps({ + ruleArguments: [], + }); + + expect(result).toEqual({ + plugins: ["jsx-a11y"], + rules: [ + { + ruleName: "jsx-a11y/role-supports-aria-props", + }, + ], + }); + }); +});