summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-07-27 15:43:12 -0500
committerMike Greiling <mike@pixelcog.com>2017-07-28 01:27:06 -0500
commit17b43cd4a1df2bbe8e4d59b015cbae741849317f (patch)
treeea4f28b6603df866e9bd7133c3b62ac0f3392c16
parentc4718a5f2f443c78a78ad144098ee049d9f70128 (diff)
downloadgitlab-ce-17b43cd4a1df2bbe8e4d59b015cbae741849317f.tar.gz
resolve eqeqeq, newline-per-chained-call, no-unused-vars, and no-else-return eslint violations
-rw-r--r--app/assets/javascripts/users/activity_calendar.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/app/assets/javascripts/users/activity_calendar.js b/app/assets/javascripts/users/activity_calendar.js
index 2efb10860d5..b109eb2b223 100644
--- a/app/assets/javascripts/users/activity_calendar.js
+++ b/app/assets/javascripts/users/activity_calendar.js
@@ -1,4 +1,4 @@
-/* eslint-disable no-var, vars-on-top, eqeqeq, newline-per-chained-call, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return, max-len, class-methods-use-this */
+/* eslint-disable no-var, vars-on-top, one-var, one-var-declaration-per-line, max-len, class-methods-use-this */
import d3 from 'd3';
@@ -70,7 +70,7 @@ export default class ActivityCalendar {
var lastColMonth = this.timestampsTmp[group - 1][0].date.getMonth();
var secondLastColMonth = this.timestampsTmp[group - 2][0].date.getMonth();
- if (lastColMonth != secondLastColMonth) {
+ if (lastColMonth !== secondLastColMonth) {
extraWidthPadding = 3;
}
@@ -79,7 +79,11 @@ export default class ActivityCalendar {
renderSvg(group) {
var width = ((group + 1) * this.daySizeWithSpace) + this.getExtraWidthPadding(group);
- this.svg = d3.select('.js-contrib-calendar').append('svg').attr('width', width).attr('height', 167).attr('class', 'contrib-calendar');
+ this.svg = d3.select('.js-contrib-calendar')
+ .append('svg')
+ .attr('width', width)
+ .attr('height', 167)
+ .attr('class', 'contrib-calendar');
}
renderDays() {
@@ -119,13 +123,10 @@ export default class ActivityCalendar {
dateText = date.format('mmm d, yyyy');
return `${contribText}<br />${gl.utils.getDayName(date)} ${dateText}`;
})
- .attr('class', 'user-contrib-cell js-tooltip').attr('fill', (stamp) => {
- if (stamp.count !== 0) {
- return this.color(Math.min(stamp.count, 40));
- } else {
- return '#ededed';
- }
- })
+ .attr('class', 'user-contrib-cell js-tooltip')
+ .attr('fill', stamp => (
+ stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed'
+ ))
.attr('data-container', 'body')
.on('click', this.clickDay);
}