diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-01-11 11:39:54 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-01-11 11:39:54 -0600 |
commit | f716049998ec41d8f26caedd65ebd1a247179926 (patch) | |
tree | a79dddcb0a2778b577fd26f01fbb82c7848314ed /app/assets/javascripts/pages | |
parent | d08610c3a654177b3e5b90a2e5f9b2f74bc8d002 (diff) | |
download | gitlab-ce-f716049998ec41d8f26caedd65ebd1a247179926.tar.gz |
Code improvements
Diffstat (limited to 'app/assets/javascripts/pages')
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(); |