You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/05 21:08:06 UTC

[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder

JoeFuentes-WebDev commented on a change in pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551#discussion_r571249201



##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-color.js
##########
@@ -11,9 +11,8 @@ export function computeColor([value = 0]) {
 
   if (value > 0) {
     return `rgba(0,0,234,${opacity})`;
-  } else{
-    return `rgba(234,0,0,${opacity})`;
   }
+  return `rgba(234,0,0,${opacity})`;

Review comment:
       would it be cleaner to have a ternary ?
   
   i.e.    return value>0 ? `rgba(0,0,234,${opacity})` : `rgba(234,0,0,${opacity})`;

##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-text-color.js
##########
@@ -7,13 +7,12 @@ import { helper } from '@ember/component/helper';
  * @return {String}          Text color (HEX)
  */
 export function computeTextColor([value = 0]) {
-  const opacity = Math.abs(value/25);
+  const opacity = Math.abs(value / 25);
 
   if (opacity < 0.5) {
-    return "#000000";
-  } else{
-    return "#ffffff" ;
+    return '#000000';
   }
+  return '#ffffff';

Review comment:
       same as above "ternary"?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org