You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/20 21:34:39 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #11699: Enforce ESLint (JavaScript linting) with pre-commit hooks

mik-laj commented on a change in pull request #11699:
URL: https://github.com/apache/airflow/pull/11699#discussion_r508854034



##########
File path: airflow/www/static/js/base.js
##########
@@ -47,57 +48,56 @@ function changDisplayedTimezone(tz) {
   });
 }
 
-var el = document.createElement('span');
-
 export function escapeHtml(text) {
+  const el = document.createElement('span');
   el.textContent = text;
   return el.innerHTML;
 }
 
 window.escapeHtml = escapeHtml;
 
-export function convertSecsToHumanReadable(seconds) {
-  var oriSeconds = seconds;
-  var floatingPart = oriSeconds- Math.floor(oriSeconds);
+export function convertSecsToHumanReadable(secs) {
+  const oriSeconds = secs;

Review comment:
       Do we have Babel on? I know there were some compatibility issues with older browsers.




----------------------------------------------------------------
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