From 958a499a7f2f9cfad35b2861c33f1a1d1e248eaf Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Thu, 15 Dec 2016 18:02:45 -0500 Subject: [PATCH] Fix eslint errors --- app/assets/javascripts/dispatcher.js.es6 | 2 +- .../javascripts/issues_bulk_assignment.js.es6 | 14 +++++++------- app/assets/javascripts/labels_select.js | 2 +- app/assets/javascripts/render_math.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index 1ec950494ff..1e259a16f06 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -75,7 +75,7 @@ case 'projects:issues:index': Issuable.init(); new gl.IssuableBulkActions({ - prefixId: page === 'projects:merge_requests:index' ? 'merge_request_' : 'issue_' + prefixId: page === 'projects:merge_requests:index' ? 'merge_request_' : 'issue_', }); shortcut_handler = new ShortcutsNavigation(); break; diff --git a/app/assets/javascripts/issues_bulk_assignment.js.es6 b/app/assets/javascripts/issues_bulk_assignment.js.es6 index 1c8e5dede6f..52fd5d71b18 100644 --- a/app/assets/javascripts/issues_bulk_assignment.js.es6 +++ b/app/assets/javascripts/issues_bulk_assignment.js.es6 @@ -6,7 +6,7 @@ class IssuableBulkActions { constructor({ container, form, issues, prefixId } = {}) { - this.prefixId = prefixId || 'issue_'; + this.prefixId = prefixId || 'issue_'; this.form = form || this.getElement('.bulk-update'); this.$labelDropdown = this.form.find('.js-label-select'); this.issues = issues || this.getElement('.issues-list .issue'); @@ -107,7 +107,7 @@ } setOriginalDropdownData() { - let $labelSelect = $('.bulk-update .js-label-select'); + const $labelSelect = $('.bulk-update .js-label-select'); $labelSelect.data('common', this.getOriginalCommonIds()); $labelSelect.data('marked', this.getOriginalMarkedIds()); $labelSelect.data('indeterminate', this.getOriginalIndeterminateIds()); @@ -115,7 +115,7 @@ // From issuable's initial bulk selection getOriginalCommonIds() { - let labelIds = []; + const labelIds = []; this.getElement('.selected_issue:checked').each((i, el) => { labelIds.push(this.getElement(`#${this.prefixId}${el.dataset.id}`).data('labels')); @@ -125,17 +125,17 @@ // From issuable's initial bulk selection getOriginalMarkedIds() { - var labelIds = []; + const labelIds = []; this.getElement('.selected_issue:checked').each((i, el) => { labelIds.push(this.getElement(`#${this.prefixId}${el.dataset.id}`).data('labels')); }); - return _.intersection.apply(_, labelIds); + return _.intersection.apply(this, labelIds); } // From issuable's initial bulk selection getOriginalIndeterminateIds() { - let uniqueIds = []; - let labelIds = []; + const uniqueIds = []; + const labelIds = []; let issuableLabels = []; // Collect unique label IDs for all checked issues diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index 6853d6b9db2..ec2fc87bece 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -8,7 +8,7 @@ var _this; _this = this; $('.js-label-select').each(function(i, dropdown) { - var $block, $colorPreview, $dropdown, $form, $loading, $selectbox, $sidebarCollapsedValue, $value, abilityName, defaultLabel, enableLabelCreateButton, issueURLSplit, issueUpdateURL, labelHTMLTemplate, labelNoneHTMLTemplate, labelUrl, namespacePath, projectPath, saveLabelData, selectedLabel, showAny, showNo, $sidebarLabelTooltip, initialSelected, $toggleText, fieldName, useId, propertyName, showMenuAbove, $container; + var $block, $colorPreview, $dropdown, $form, $loading, $selectbox, $sidebarCollapsedValue, $value, abilityName, defaultLabel, enableLabelCreateButton, issueURLSplit, issueUpdateURL, labelHTMLTemplate, labelNoneHTMLTemplate, labelUrl, namespacePath, projectPath, saveLabelData, selectedLabel, showAny, showNo, $sidebarLabelTooltip, initialSelected, $toggleText, fieldName, useId, propertyName, showMenuAbove, $container, $dropdownContainer; $dropdown = $(dropdown); $dropdownContainer = $dropdown.closest('.labels-filter'); $toggleText = $dropdown.find('.dropdown-toggle-text'); diff --git a/app/assets/javascripts/render_math.js b/app/assets/javascripts/render_math.js index a8a56430f88..209e7a8661d 100644 --- a/app/assets/javascripts/render_math.js +++ b/app/assets/javascripts/render_math.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-undef, no-else-return, prefer-arrow-callback, padded-blocks, max-len */ +/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-undef, no-else-return, prefer-arrow-callback, padded-blocks, max-len, no-console */ // Renders math using KaTeX in any element with the // `js-render-math` class //