Enable radix
This enables the radix linting rule from eslint-config-openstack, and corrects any found errors. Change-Id: Icfb8dd7a91770a84f94468693609093aedd31337
This commit is contained in:
parent
2aa78ad0b7
commit
87a8f3bee5
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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 = {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 = [];
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user