@@ -189,12 +189,12 @@ constructLinter.add({
189189
190190constructLinter . add ( { 
191191  code : 'props-no-unions' , 
192-   message : 'props should  not use TypeScript unions' , 
192+   message : 'props must  not use TypeScript unions' , 
193193  eval : e  =>  { 
194194    if  ( ! e . ctx . propsType )  {  return ;  } 
195195    if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
196196
197-     // this rule only applies  to L2  constructs 
197+     // this rule does not apply  to L1  constructs 
198198    if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
199199
200200    for  ( const  property  of  e . ctx . propsType . ownProperties )  { 
@@ -205,12 +205,12 @@ constructLinter.add({
205205
206206constructLinter . add ( { 
207207  code : 'props-no-arn-refs' , 
208-   message : 'props should  use strong types instead of attributes. props should not have "arn" suffix' , 
208+   message : 'props must  use strong types instead of attributes. props should not have "arn" suffix' , 
209209  eval : e  =>  { 
210210    if  ( ! e . ctx . propsType )  {  return ;  } 
211211    if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
212212
213-     // this rule only applies  to L2  constructs 
213+     // this rule does not apply  to L1  constructs 
214214    if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
215215
216216    for  ( const  property  of  e . ctx . propsType . ownProperties )  { 
@@ -221,12 +221,12 @@ constructLinter.add({
221221
222222constructLinter . add ( { 
223223  code : 'props-no-tokens' , 
224-   message : 'props should  not use the "Token" type' , 
224+   message : 'props must  not use the "Token" type' , 
225225  eval : e  =>  { 
226226    if  ( ! e . ctx . propsType )  {  return ;  } 
227227    if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
228228
229-     // this rule only applies  to L2  constructs 
229+     // this rule does not apply  to L1  constructs 
230230    if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
231231
232232    for  ( const  property  of  e . ctx . propsType . allProperties )  { 
@@ -242,12 +242,12 @@ constructLinter.add({
242242
243243constructLinter . add ( { 
244244  code : 'props-no-cfn-types' , 
245-   message : 'props should  not expose L1 types (types which start with "Cfn")' , 
245+   message : 'props must  not expose L1 types (types which start with "Cfn")' , 
246246  eval : e  =>  { 
247247    if  ( ! e . ctx . propsType )  {  return ;  } 
248248    if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
249249
250-     // this rule only applies  to L2  constructs 
250+     // this rule does not apply  to L1  constructs 
251251    if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
252252
253253    for  ( const  property  of  e . ctx . propsType . ownProperties )  { 
@@ -263,17 +263,33 @@ constructLinter.add({
263263
264264constructLinter . add ( { 
265265  code : 'props-default-doc' , 
266-   message : 'All optional props should  have @default documentation' , 
266+   message : 'All optional props must  have @default documentation' , 
267267  eval : e  =>  { 
268268    if  ( ! e . ctx . propsType )  {  return ;  } 
269269    if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
270270
271-     // this rule only applies  to L2  constructs 
271+     // this rule does not apply  to L1  constructs 
272272    if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
273273
274274    for  ( const  property  of  e . ctx . propsType . allProperties )  { 
275275      if  ( ! property . optional )  {  continue ;  } 
276276      e . assert ( property . docs . docs . default  !==  undefined ,  `${ e . ctx . propsFqn }  .${ property . name }  ` ) ; 
277277    } 
278278  } 
279-   } ) ; 
279+   } ) ; 
280+ 
281+ constructLinter . add ( { 
282+   code : 'props-no-any' , 
283+   message : 'props must not use Typescript "any" type' , 
284+   eval : e  =>  { 
285+     if  ( ! e . ctx . propsType )  {  return ;  } 
286+     if  ( ! e . ctx . hasPropsArgument )  {  return ;  } 
287+ 
288+     // this rule does not apply to L1 constructs 
289+     if  ( CoreTypes . isCfnResource ( e . ctx . classType ) )  {  return ;  } 
290+ 
291+     for  ( const  property  of  e . ctx . propsType . ownProperties )  { 
292+     e . assert ( ! property . type . isAny ,  `${ e . ctx . propsFqn }  .${ property . name }  ` ) ; 
293+     } 
294+   } 
295+ } ) ; 
0 commit comments