File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ function handleContractDefinitionComments(
2626 options . locEnd
2727 ) ;
2828
29+ // In this scenario we are in between jus after a base contract declaration.
2930 if ( precedingNode && precedingNode . type === 'InheritanceSpecifier' ) {
3031 if (
3132 ( followingNode && followingNode . type === 'InheritanceSpecifier' ) ||
@@ -36,6 +37,8 @@ function handleContractDefinitionComments(
3637 }
3738 }
3839
40+ // In this scenario we have a comment just after the contract's name
41+ // TODO: at the moment we prepended it but this should be kept after the name.
3942 if (
4043 ( followingNode && followingNode . type === 'InheritanceSpecifier' ) ||
4144 nextCharacter === '{'
@@ -44,6 +47,8 @@ function handleContractDefinitionComments(
4447 return true ;
4548 }
4649
50+ // When the contract is empty and contain comments.
51+ // Most likely disabling a linter rule.
4752 if ( enclosingNode . subNodes . length === 0 ) {
4853 addDanglingComment ( enclosingNode , comment ) ;
4954 return true ;
You can’t perform that action at this time.
0 commit comments