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 { convertNoImplicitAnyCatch } from "./ruleConverters/eslint-plugin-rxjs/no-implicit-any-catch";

/**
* 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-implicit-any-catch", convertNoImplicitAnyCatch],

// 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 convertNoImplicitAnyCatch: RuleConverter = () => {
return {
rules: [
{
ruleName: "rxjs/no-implicit-any-catch",
},
],
plugins: ["eslint-plugin-rxjs"],
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { convertNoImplicitAnyCatch } from "../no-implicit-any-catch";

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

expect(result).toEqual({
rules: [
{
ruleName: "rxjs/no-implicit-any-catch",
},
],
plugins: ["eslint-plugin-rxjs"],
});
});
});