[ 
https://issues.apache.org/jira/browse/HDDS-15144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Will Xiao reassigned HDDS-15144:
--------------------------------

    Assignee: Will Xiao

> [Recon] Fix promise/prefer-await-to-then ESLint warnings
> --------------------------------------------------------
>
>                 Key: HDDS-15144
>                 URL: https://issues.apache.org/jira/browse/HDDS-15144
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Recon
>            Reporter: Will Xiao
>            Assignee: Will Xiao
>            Priority: Minor
>
> While running ESLint checks on the {{ozone-recon-web}} codebase, multiple 
> warnings were triggered by the {{promise/prefer-await-to-then}} rule.
> *Affected Files:* The ESLint warnings are present in the following components:
> {code:java}
> $ pnpm run lint| awk '/^\// { file=$0; printed=0 } 
> /promise\/prefer-await-to-then/ { if(!printed){ print file; printed=1 } print 
> $0 }'
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx
>   74:41  warning  Prefer await to then()/catch()/finally()                    
>                                                                  
> promise/prefer-await-to-then
>   81:8   warning  Prefer await to then()/catch()/finally()                    
>                                                                  
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/insights/omInsights.tsx
>   72:15  warning  Prefer await to then()/catch()/finally()                    
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                 
> promise/prefer-await-to-then
>   88:10  warning  Prefer await to then()/catch()/finally()                    
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                 
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/overview/overview.tsx
>   130:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                  
> promise/prefer-await-to-then
>   133:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                  
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/buckets/buckets.tsx
>   432:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   494:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
>   480:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   482:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   484:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/diskUsage/diskUsage.tsx
>   149:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   240:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   299:20  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   316:27  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   326:14  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   478:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   489:18  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   523:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/heatMap/heatmap.tsx
>   146:15   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>   164:10   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/insights.tsx
>   360:14  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   433:9   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx
>    535:13  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    543:8   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    572:13  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    589:8   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    619:13  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    648:8   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    718:13  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    725:8   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    752:13  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    759:8   warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    815:15  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
>    825:10  warning  Prefer await to then()/catch()/finally()                  
>                                                                    
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/missingContainers/missingContainers.tsx
>   269:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   284:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   322:15  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   335:10  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx
>   141:14  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   224:9   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   245:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   251:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/pipelines/pipelines.tsx
>   194:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
>   204:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                   
> promise/prefer-await-to-then
> /home/wxiao/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/volumes/volumes.tsx
>   289:13  warning  Prefer await to then()/catch()/finally()                   
>                                                                               
>                                                                               
>               promise/prefer-await-to-then
>   314:8   warning  Prefer await to then()/catch()/finally()                   
>                                                                               
>                                                                               
>               promise/prefer-await-to-then {code}
> Refer to:
> [https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to