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 @@ -183,6 +183,7 @@ import { convertJsxWrapMultiline } from "./ruleConverters/eslint-plugin-react/js

//eslint-plugin-rxjs converters
import { convertNoAsyncSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-async-subscribe";
import { convertNoUnboundMethods } from "./ruleConverters/eslint-plugin-rxjs/no-unbound-methods";

/**
* Keys TSLint rule names to their ESLint rule converters.
Expand Down Expand Up @@ -368,6 +369,7 @@ export const ruleConverters = new Map([
["use-pipe-transform-interface", convertUsePipeTransformInterface],
["variable-name", convertVariableName],
["rxjs-no-async-subscribe", convertNoAsyncSubscribe],
["rxjs-no-unbound-methods", convertNoUnboundMethods],

// These converters are all for rules that need more complex option conversions.
// Some of them will likely need to have notices about changed lint behaviors...
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { RuleConverter } from "../../ruleConverter";

export const convertNoUnboundMethods: RuleConverter = () => {
return {
rules: [
{
ruleName: "rxjs/no-unbound-methods",
},
],
plugins: ["eslint-plugin-rxjs"],
};
};
Original file line number Diff line number Diff line change
@@ -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"],
});
});
});