diff --git a/src/converters/lintConfigs/rules/ruleConverters.ts b/src/converters/lintConfigs/rules/ruleConverters.ts index 30a337aac..3e1eaac04 100644 --- a/src/converters/lintConfigs/rules/ruleConverters.ts +++ b/src/converters/lintConfigs/rules/ruleConverters.ts @@ -191,6 +191,7 @@ import { convertNoInternal } from "./ruleConverters/eslint-plugin-rxjs/no-intern import { convertNoNestedSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-nested-subscribe"; import { convertNoRedundantNotify } from "./ruleConverters/eslint-plugin-rxjs/no-redundant-notify"; import { convertNoShareReplay } from "./ruleConverters/eslint-plugin-rxjs/no-sharereplay"; +import { convertNoUnboundMethods } from "./ruleConverters/eslint-plugin-rxjs/no-unbound-methods"; import { convertNoUnsafeSubjectNext } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-subject-next"; /** @@ -385,6 +386,7 @@ export const ruleConverters = new Map([ ["rxjs-no-nested-subscribe", convertNoNestedSubscribe], ["rxjs-no-redundant-notify", convertNoRedundantNotify], ["rxjs-no-sharereplay", convertNoShareReplay], + ["rxjs-no-unbound-methods", convertNoUnboundMethods], ["rxjs-no-unsafe-subject-next", convertNoUnsafeSubjectNext], // These converters are all for rules that need more complex option conversions. diff --git a/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/no-unbound-methods.ts b/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/no-unbound-methods.ts new file mode 100644 index 000000000..b0918a600 --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/no-unbound-methods.ts @@ -0,0 +1,12 @@ +import { RuleConverter } from "../../ruleConverter"; + +export const convertNoUnboundMethods: RuleConverter = () => { + return { + rules: [ + { + ruleName: "rxjs/no-unbound-methods", + }, + ], + plugins: ["eslint-plugin-rxjs"], + }; +}; diff --git a/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/tests/no-unbound-methods.test.ts b/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/tests/no-unbound-methods.test.ts new file mode 100644 index 000000000..7709be2df --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/tests/no-unbound-methods.test.ts @@ -0,0 +1,18 @@ +import { convertNoUnboundMethods } from "../no-unbound-methods"; + +describe(convertNoUnboundMethods, () => { + test("conversion without arguments", () => { + const result = convertNoUnboundMethods({ + ruleArguments: [], + }); + + expect(result).toEqual({ + rules: [ + { + ruleName: "rxjs/no-unbound-methods", + }, + ], + plugins: ["eslint-plugin-rxjs"], + }); + }); +});