verdan commented on a change in pull request #3656: [WIP][AIRFLOW-2803] Fix all
ESLint issues
URL: https://github.com/apache/incubator-airflow/pull/3656#discussion_r206791865
##########
File path: airflow/www_rbac/templates/airflow/circles.html
##########
@@ -28,117 +28,111 @@ <h1>Airflow 404 = lots of circles</h1>
</div>
<script src="{{ url_for_asset('d3.min.js') }}"></script>
<script>
- var height =700;
- var width = document.getElementById("div_svg").offsetWidth;
- var points = 20;
- var matrix = [];
- var duration = 2000;
- var i = 0;
- var flip = 0;
- var colors = [
- "#FF5A5F", "#007A87", "#7B0051", "#00D1C1", "#8CE071", "#FFB400",
- "#FFAA91", "#B4A76C", "#9CA299", "#565A5C"
+ /* global d3 */
+
+ const height = 700;
+ const width = document.getElementById('div_svg').offsetWidth;
+ const points = 20;
+ const matrix = [];
+ const duration = 2000;
+ let i = 0;
+ let flip = 0;
+ const colors = [
+ '#FF5A5F', '#007A87', '#7B0051', '#00D1C1', '#8CE071', '#FFB400',
+ '#FFAA91', '#B4A76C', '#9CA299', '#565A5C',
];
function choose(choices) {
- var index = Math.floor(Math.random() * choices.length);
- return choices[index];
+ const index = Math.floor(Math.random() * choices.length);
Review comment:
Also, the plan is to extract all the inline JS into separate .js files and
then we'd be able to compile all JS to make it work across all browsers.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services