diff --git a/.eslintrc b/.eslintrc index c1f5a5907b..3c7dacb402 100644 --- a/.eslintrc +++ b/.eslintrc @@ -33,7 +33,6 @@ rules: eqeqeq: 1 consistent-return: 1 callback-return: 1 - radix: 1 guard-for-in: 1 block-scoped-var: 1 semi-spacing: 1 diff --git a/horizon/static/framework/widgets/metadata/tree/tree.service.js b/horizon/static/framework/widgets/metadata/tree/tree.service.js index 68bca290d6..eb5a083ed2 100644 --- a/horizon/static/framework/widgets/metadata/tree/tree.service.js +++ b/horizon/static/framework/widgets/metadata/tree/tree.service.js @@ -75,7 +75,7 @@ switch (this.type) { case 'integer': - this.value = parseInt(value); + this.value = parseInt(value, 10); break; case 'number': this.value = parseFloat(value); diff --git a/horizon/static/framework/widgets/table/hz-expand-detail.directive.js b/horizon/static/framework/widgets/table/hz-expand-detail.directive.js index ead2f333eb..70ded61e0d 100644 --- a/horizon/static/framework/widgets/table/hz-expand-detail.directive.js +++ b/horizon/static/framework/widgets/table/hz-expand-detail.directive.js @@ -76,7 +76,7 @@ var summaryRow = element.closest('tr'); var detailCell = summaryRow.next('tr').find('.detail'); - var duration = scope.duration ? parseInt(scope.duration) : settings.duration; + var duration = scope.duration ? parseInt(scope.duration, 10) : settings.duration; if (summaryRow.hasClass('expanded')) { var options = { diff --git a/horizon/static/horizon/js/horizon.d3linechart.js b/horizon/static/horizon/js/horizon.d3linechart.js index 37585ae771..e4f366f1a1 100644 --- a/horizon/static/horizon/js/horizon.d3linechart.js +++ b/horizon/static/horizon/js/horizon.d3linechart.js @@ -479,7 +479,7 @@ horizon.d3_line_chart = { graph: graph, formatter: function(series, x, y) { if(y % 1 === 0) { - y = parseInt(y); + y = parseInt(y, 10); } else { y = parseFloat(y).toFixed(2); } diff --git a/horizon/static/horizon/js/horizon.d3piechart.js b/horizon/static/horizon/js/horizon.d3piechart.js index e11923cd46..3baa9fdb2b 100644 --- a/horizon/static/horizon/js/horizon.d3piechart.js +++ b/horizon/static/horizon/js/horizon.d3piechart.js @@ -58,7 +58,7 @@ horizon.d3_pie_chart_usage = { self.data = data[0]; self.pieChart(i, false); } else { - var used = Math.min(parseInt(data), 100); + var used = Math.min(parseInt(data, 10), 100); self.data = [{"percentage":used}, {"percentage":100 - used}]; self.pieChart(i, true); } @@ -160,7 +160,7 @@ horizon.d3_pie_chart_distribution = { var total = 0; for (var j = 0; j < self.data.length; j++) { - total = total + parseInt(self.data[j].value); + total = total + parseInt(self.data[j].value, 10); } var initial_data = []; diff --git a/horizon/static/horizon/js/horizon.quota.js b/horizon/static/horizon/js/horizon.quota.js index ec2b4dd20d..d7e21d0b34 100644 --- a/horizon/static/horizon/js/horizon.quota.js +++ b/horizon/static/horizon/js/horizon.quota.js @@ -432,7 +432,7 @@ horizon.Quota = { update: function(element, value) { var full = "#D0342B"; var addition = "#00D300"; - var already_used = parseInt(d3.select("#"+element).select(".usedbar").attr("d")); + var already_used = parseInt(d3.select("#"+element).select(".usedbar").attr("d"), 10); d3.select("#"+element).select(".newbar") .transition() .duration(500)