File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import { convertNoEmpty } from "./converters/no-empty";
4343import { convertNoEmptyInterface } from "./converters/no-empty-interface" ;
4444import { convertNoEval } from "./converters/no-eval" ;
4545import { convertNoExplicitAny } from "./converters/no-explicit-any" ;
46+ import { convertNoFloatingPromises } from "./converters/no-floating-promises" ;
4647import { convertNoForInArray } from "./converters/no-for-in-array" ;
4748import { convertNoInferrableTypes } from "./converters/no-inferrable-types" ;
4849import { convertNoInternalModule } from "./converters/no-internal-module" ;
@@ -135,6 +136,7 @@ export const converters = new Map([
135136 [ "no-duplicate-switch-case" , convertNoDuplicateSwitchCase ] ,
136137 [ "no-empty-interface" , convertNoEmptyInterface ] ,
137138 [ "no-eval" , convertNoEval ] ,
139+ [ "no-floating-promises" , convertNoFloatingPromises ] ,
138140 [ "no-for-in-array" , convertNoForInArray ] ,
139141 [ "no-inferrable-types" , convertNoInferrableTypes ] ,
140142 [ "no-internal-module" , convertNoInternalModule ] ,
Original file line number Diff line number Diff line change 1+ import { RuleConverter } from "../converter" ;
2+
3+ export const convertNoFloatingPromises : RuleConverter = ( ) => {
4+ return {
5+ rules : [
6+ {
7+ ruleName : "@typescript-eslint/no-floating-promises" ,
8+ } ,
9+ ] ,
10+ } ;
11+ } ;
Original file line number Diff line number Diff line change 1+ import { convertNoFloatingPromises } from "../no-floating-promises" ;
2+
3+ describe ( convertNoFloatingPromises , ( ) => {
4+ test ( "conversion without arguments" , ( ) => {
5+ const result = convertNoFloatingPromises ( {
6+ ruleArguments : [ ] ,
7+ } ) ;
8+
9+ expect ( result ) . toEqual ( {
10+ rules : [
11+ {
12+ ruleName : "@typescript-eslint/no-floating-promises" ,
13+ } ,
14+ ] ,
15+ } ) ;
16+ } ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments