@@ -16,19 +16,19 @@ const findNodeWithDecorator = (node: any, decoratorName: string) => {
1616 return null ;
1717 }
1818 return node . decorators . find (
19- ( decorator : any ) => decorator . expression . callee . name === decoratorName
19+ ( decorator : any ) => decorator . expression . callee . name === decoratorName ,
2020 ) ;
2121} ;
2222
2323const badModelInjectionRule = (
24- context : TSESLint . RuleContext < MessageIds , [ ] >
24+ context : TSESLint . RuleContext < MessageIds , [ ] > ,
2525) => {
2626 return {
2727 ClassBody ( node : any ) {
2828 const constructorNode = node . body . find (
2929 ( bodyNode : any ) =>
3030 bodyNode . type === AST_NODE_TYPES . MethodDefinition &&
31- bodyNode . kind === "constructor"
31+ bodyNode . kind === "constructor" ,
3232 ) ;
3333
3434 if ( ! constructorNode ) {
@@ -41,7 +41,7 @@ const badModelInjectionRule = (
4141 }
4242
4343 const paramWithModelDecorator = params . find ( ( param : any ) =>
44- findNodeWithDecorator ( param , DECORATOR_NAME )
44+ findNodeWithDecorator ( param , DECORATOR_NAME ) ,
4545 ) ;
4646
4747 if ( ! paramWithModelDecorator ) {
@@ -64,7 +64,7 @@ const badModelInjectionRule = (
6464 }
6565
6666 if ( parameter . typeAnnotation ?. typeAnnotation ) {
67- const { typeName, typeArguments } =
67+ const { typeName, typeParameters } =
6868 parameter . typeAnnotation . typeAnnotation ;
6969
7070 if ( typeName . name !== "Model" ) {
@@ -74,7 +74,7 @@ const badModelInjectionRule = (
7474 } ) ;
7575 }
7676
77- if ( ! typeArguments || typeArguments ?. params ?. length !== 1 ) {
77+ if ( ! typeParameters || typeParameters ?. params ?. length !== 1 ) {
7878 return context . report ( {
7979 node : paramWithModelDecorator ,
8080 messageId : MessageIdsEnum . missingModelType ,
0 commit comments