@@ -24,9 +24,9 @@ const rule: Rule = {
2424 assert . equal ( moduleScope . upper , scopeManager . globalScope ) ;
2525
2626 context . report ( {
27- message : `File has ${ scopeManager . scopes . length } scopes: ${
28- scopeManager . scopes . map ( ( s : any ) => s . block ?. id ?. name ?? '<' + s . constructor . name + '>' ) . join ( ', ')
29- } `,
27+ message : `File has ${ scopeManager . scopes . length } scopes: ${ scopeManager . scopes
28+ . map ( ( s : any ) => s . block ?. id ?. name ?? '<' + s . constructor . name + '>' )
29+ . join ( ', ' ) } `,
3030 node : SPAN ,
3131 } ) ;
3232
@@ -37,9 +37,9 @@ const rule: Rule = {
3737 if ( node . declarations [ 0 ] . id . type === 'ObjectPattern' ) {
3838 const variables = context . sourceCode . scopeManager . getDeclaredVariables ( node ) ;
3939 context . report ( {
40- message : `VariableDeclaration declares ${ variables . length } variables: ${
41- variables . map ( v => v . name ) . join ( ', ' )
42- } .`,
40+ message : `VariableDeclaration declares ${ variables . length } variables: ${ variables
41+ . map ( ( v ) => v . name )
42+ . join ( ', ' ) } .`,
4343 node : node ,
4444 } ) ;
4545 }
@@ -49,9 +49,9 @@ const rule: Rule = {
4949 const topLevelFunctionScope = context . sourceCode . scopeManager . acquire ( node ) ! ;
5050 assert . equal ( topLevelFunctionScope . upper , moduleScope ) ;
5151 context . report ( {
52- message : `topLevelFunction has ${ topLevelFunctionScope . variables . length } local variables: ${
53- topLevelFunctionScope ?. variables . map ( v => v . name ) . join ( ', ' )
54- } . Child scopes: ${ topLevelFunctionScope . childScopes . length } .`,
52+ message : `topLevelFunction has ${ topLevelFunctionScope . variables . length } local variables: ${ topLevelFunctionScope ?. variables
53+ . map ( ( v ) => v . name )
54+ . join ( ', ' ) } . Child scopes: ${ topLevelFunctionScope . childScopes . length } .`,
5555 node : topLevelFunctionScope . block ,
5656 } ) ;
5757 }
@@ -61,9 +61,9 @@ const rule: Rule = {
6161 const topLevelModuleScope = context . sourceCode . scopeManager . acquire ( node ) ! ;
6262 assert . equal ( topLevelModuleScope . upper , moduleScope ) ;
6363 context . report ( {
64- message : `TopLevelModule has ${ topLevelModuleScope . variables . length } local variables: ${
65- topLevelModuleScope ?. variables . map ( v => v . name ) . join ( ', ' )
66- } . Child scopes: ${ topLevelModuleScope . childScopes . length } .`,
64+ message : `TopLevelModule has ${ topLevelModuleScope . variables . length } local variables: ${ topLevelModuleScope ?. variables
65+ . map ( ( v ) => v . name )
66+ . join ( ', ' ) } . Child scopes: ${ topLevelModuleScope . childScopes . length } .`,
6767 node : topLevelModuleScope . block ,
6868 } ) ;
6969 }
@@ -78,19 +78,19 @@ const rule: Rule = {
7878 assert ( 'name' in upperBlock . id ) ;
7979 assert . equal ( upperBlock . id . name , 'TestClass' ) ;
8080 context . report ( {
81- message : `TestClass static block has ${ staticBlockScope . variables . length } local variables: ${
82- staticBlockScope ?. variables . map ( v => v . name ) . join ( ', ' )
83- } . Child scopes: ${ staticBlockScope . childScopes . length } .`,
81+ message : `TestClass static block has ${ staticBlockScope . variables . length } local variables: ${ staticBlockScope ?. variables
82+ . map ( ( v ) => v . name )
83+ . join ( ', ' ) } . Child scopes: ${ staticBlockScope . childScopes . length } .`,
8484 node : node ,
8585 } ) ;
8686 } ,
8787 LabeledStatement ( node ) {
8888 const labeledStatementScope = context . sourceCode . scopeManager . acquire ( node . body ) ! ;
8989 assert . equal ( labeledStatementScope . upper , moduleScope ) ;
9090 context . report ( {
91- message : `LabeledStatement's block has ${ labeledStatementScope . variables . length } local variables: ${
92- labeledStatementScope ?. variables . map ( v => v . name ) . join ( ', ' )
93- } . Child scopes: ${ labeledStatementScope . childScopes . length } .`,
91+ message : `LabeledStatement's block has ${ labeledStatementScope . variables . length } local variables: ${ labeledStatementScope ?. variables
92+ . map ( ( v ) => v . name )
93+ . join ( ', ' ) } . Child scopes: ${ labeledStatementScope . childScopes . length } .`,
9494 node : node ,
9595 } ) ;
9696 } ,
0 commit comments