Enable eslint

This commit is contained in:
Filipa Lacerda 2017-10-31 11:27:50 +00:00
parent 1c978aff62
commit 9afa9b8d76
No known key found for this signature in database
GPG Key ID: 9CA3FDE4D1E2F1C8
1 changed files with 11 additions and 14 deletions

View File

@ -1,25 +1,22 @@
/* eslint-disable func-names,wrap-iife, no-shadow, no-unused-vars, one-var */
export default function issueStatusSelect() {
$('.js-issue-status').each(function (i, el) {
$('.js-issue-status').each((i, el) => {
const fieldName = $(el).data('field-name');
return $(el).glDropdown({
selectable: true,
fieldName,
toggleLabel: (function (_this) {
return function (selected, el, instance) {
let label = 'Author';
const $item = instance.dropdown.find('.is-active');
if ($item.length) {
label = $item.text();
}
return label;
};
})(this),
toggleLabel(selected, element, instance) {
let label = 'Author';
const $item = instance.dropdown.find('.is-active');
if ($item.length) {
label = $item.text();
}
return label;
},
clicked(options) {
return options.e.preventDefault();
},
id(obj, el) {
return $(el).data('id');
id(obj, element) {
return $(element).data('id');
},
});
});