summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luís <aluis@gitlab.com>2018-02-12 15:52:23 +0000
committerAndré Luís <aluis@gitlab.com>2018-02-12 19:11:33 +0000
commitf73315591fcd05f16e014d2eaeeb42cb0f8d9543 (patch)
tree02dc01983ac243695cbb612bf989ea3984aea10a
parent74c4d35250c09cf3cdcf659d51c83bc7ba83df92 (diff)
downloadgitlab-ce-andr3-clean-eslint-disables-from-board-components.tar.gz
Clean new Flash() and stop disabling no-new (eslint) when possibleandr3-clean-eslint-disables-from-board-components
-rw-r--r--app/assets/javascripts/boards/components/board_sidebar.js2
-rw-r--r--app/assets/javascripts/boards/components/modal/footer.js4
-rw-r--r--app/assets/javascripts/boards/components/sidebar/remove_issue.js4
3 files changed, 3 insertions, 7 deletions
diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js
index 983429550f0..12290703754 100644
--- a/app/assets/javascripts/boards/components/board_sidebar.js
+++ b/app/assets/javascripts/boards/components/board_sidebar.js
@@ -95,7 +95,7 @@ gl.issueBoards.BoardSidebar = Vue.extend({
})
.catch(() => {
this.loadingAssignees = false;
- return new Flash('An error occurred while saving assignees');
+ Flash('An error occurred while saving assignees');
});
},
},
diff --git a/app/assets/javascripts/boards/components/modal/footer.js b/app/assets/javascripts/boards/components/modal/footer.js
index 182957113a2..8bf4d88ebdc 100644
--- a/app/assets/javascripts/boards/components/modal/footer.js
+++ b/app/assets/javascripts/boards/components/modal/footer.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-new */
-
import Vue from 'vue';
import Flash from '../../../flash';
import './lists_dropdown';
@@ -36,7 +34,7 @@ gl.issueBoards.ModalFooter = Vue.extend({
gl.boardService.bulkUpdate(issueIds, {
add_label_ids: [list.label.id],
}).catch(() => {
- new Flash('Failed to update issues, please try again.', 'alert');
+ Flash('Failed to update issues, please try again.');
selectedIssues.forEach((issue) => {
list.removeIssue(issue);
diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.js b/app/assets/javascripts/boards/components/sidebar/remove_issue.js
index 1ad97211934..1e98645dc1c 100644
--- a/app/assets/javascripts/boards/components/sidebar/remove_issue.js
+++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-new */
-
import Vue from 'vue';
import Flash from '../../../flash';
@@ -45,7 +43,7 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
},
};
Vue.http.patch(this.updateUrl, data).catch(() => {
- new Flash('Failed to remove issue from board, please try again.', 'alert');
+ Flash('Failed to remove issue from board, please try again.');
lists.forEach((list) => {
list.addIssue(issue);