diff --git a/src/rules/converters.ts b/src/rules/converters.ts index 78b2b9e94..e6ee572ca 100644 --- a/src/rules/converters.ts +++ b/src/rules/converters.ts @@ -31,6 +31,7 @@ import { convertNewlinePerChainedCall } from "./converters/newline-per-chained-c import { convertNewParens } from "./converters/new-parens"; import { convertNoAngleBracketTypeAssertion } from "./converters/no-angle-bracket-type-assertion"; import { convertNoArg } from "./converters/no-arg"; +import { convertNoAsyncWithoutAwait } from "./converters/no-async-without-await"; import { convertNoBannedTerms } from "./converters/no-banned-terms"; import { convertNoBitwise } from "./converters/no-bitwise"; import { convertNoConditionalAssignment } from "./converters/no-conditional-assignment"; @@ -149,6 +150,7 @@ export const converters = new Map([ ["no-angle-bracket-type-assertion", convertNoAngleBracketTypeAssertion], ["no-any", convertNoExplicitAny], ["no-arg", convertNoArg], + ["no-async-without-await", convertNoAsyncWithoutAwait], ["no-banned-terms", convertNoBannedTerms], ["no-bitwise", convertNoBitwise], ["no-conditional-assignment", convertNoConditionalAssignment], diff --git a/src/rules/converters/no-async-without-await.ts b/src/rules/converters/no-async-without-await.ts new file mode 100644 index 000000000..7f8a5ff49 --- /dev/null +++ b/src/rules/converters/no-async-without-await.ts @@ -0,0 +1,11 @@ +import { RuleConverter } from "../converter"; + +export const convertNoAsyncWithoutAwait: RuleConverter = () => { + return { + rules: [ + { + ruleName: "@typescript-eslint/require-await", + }, + ], + }; +}; diff --git a/src/rules/converters/tests/no-async-without-await.test.ts b/src/rules/converters/tests/no-async-without-await.test.ts new file mode 100644 index 000000000..1a6084c6c --- /dev/null +++ b/src/rules/converters/tests/no-async-without-await.test.ts @@ -0,0 +1,17 @@ +import { convertNoAsyncWithoutAwait } from "../no-async-without-await"; + +describe(convertNoAsyncWithoutAwait, () => { + test("conversion without arguments", () => { + const result = convertNoAsyncWithoutAwait({ + ruleArguments: [], + }); + + expect(result).toEqual({ + rules: [ + { + ruleName: "@typescript-eslint/require-await", + }, + ], + }); + }); +});