diff --git a/src/rules/converters.ts b/src/rules/converters.ts index 2629d594d..76902786d 100644 --- a/src/rules/converters.ts +++ b/src/rules/converters.ts @@ -13,6 +13,7 @@ import { convertClassName } from "./converters/class-name"; import { convertCommentFormat } from "./converters/comment-format"; import { convertCurly } from "./converters/curly"; import { convertCyclomaticComplexity } from "./converters/cyclomatic-complexity"; +import { convertDeprecation } from "./converters/deprecation"; import { convertEofline } from "./converters/eofline"; import { convertFileNameCasing } from "./converters/file-name-casing"; import { convertForin } from "./converters/forin"; @@ -147,6 +148,7 @@ export const converters = new Map([ ["comment-format", convertCommentFormat], ["curly", convertCurly], ["cyclomatic-complexity", convertCyclomaticComplexity], + ["deprecation", convertDeprecation], ["eofline", convertEofline], ["file-name-casing", convertFileNameCasing], ["forin", convertForin], diff --git a/src/rules/converters/deprecation.ts b/src/rules/converters/deprecation.ts new file mode 100644 index 000000000..2a298e18e --- /dev/null +++ b/src/rules/converters/deprecation.ts @@ -0,0 +1,12 @@ +import { RuleConverter } from "../converter"; + +export const convertDeprecation: RuleConverter = () => { + return { + rules: [ + { + ruleName: "import/no-deprecated", + }, + ], + plugins: ["eslint-plugin-import"], + }; +}; diff --git a/src/rules/converters/tests/deprecation.test.ts b/src/rules/converters/tests/deprecation.test.ts new file mode 100644 index 000000000..1870029e7 --- /dev/null +++ b/src/rules/converters/tests/deprecation.test.ts @@ -0,0 +1,18 @@ +import { convertDeprecation } from "../deprecation"; + +describe(convertDeprecation, () => { + test("conversion without arguments", () => { + const result = convertDeprecation({ + ruleArguments: [], + }); + + expect(result).toEqual({ + rules: [ + { + ruleName: "import/no-deprecated", + }, + ], + plugins: ["eslint-plugin-import"], + }); + }); +});