diff options
Diffstat (limited to 'app/assets/javascripts/pages/projects/labels')
3 files changed, 5 insertions, 10 deletions
diff --git a/app/assets/javascripts/pages/projects/labels/edit/index.js b/app/assets/javascripts/pages/projects/labels/edit/index.js index 75dc1ef1859..72c5e4744ac 100644 --- a/app/assets/javascripts/pages/projects/labels/edit/index.js +++ b/app/assets/javascripts/pages/projects/labels/edit/index.js @@ -1,5 +1,3 @@ import Labels from '~/labels'; -export default function () { - new Labels(); // eslint-disable-line no-new -} +export default () => new Labels(); diff --git a/app/assets/javascripts/pages/projects/labels/index/index.js b/app/assets/javascripts/pages/projects/labels/index/index.js index c258be4f908..82a5b4d0760 100644 --- a/app/assets/javascripts/pages/projects/labels/index/index.js +++ b/app/assets/javascripts/pages/projects/labels/index/index.js @@ -1,19 +1,18 @@ -/* eslint-disable no-new */ import LabelManager from '~/label_manager'; import GroupLabelSubscription from '~/group_label_subscription'; import ProjectLabelSubscription from '~/project_label_subscription'; export default () => { if ($('.prioritized-labels').length) { - new LabelManager(); + new LabelManager(); // eslint-disable-line no-new } $('.label-subscription').each((i, el) => { const $el = $(el); if ($el.find('.dropdown-group-label').length) { - new GroupLabelSubscription($el); + new GroupLabelSubscription($el); // eslint-disable-line no-new } else { - new ProjectLabelSubscription($el); + new ProjectLabelSubscription($el); // eslint-disable-line no-new } }); }; diff --git a/app/assets/javascripts/pages/projects/labels/new/index.js b/app/assets/javascripts/pages/projects/labels/new/index.js index 75dc1ef1859..72c5e4744ac 100644 --- a/app/assets/javascripts/pages/projects/labels/new/index.js +++ b/app/assets/javascripts/pages/projects/labels/new/index.js @@ -1,5 +1,3 @@ import Labels from '~/labels'; -export default function () { - new Labels(); // eslint-disable-line no-new -} +export default () => new Labels(); |