summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-02 17:43:20 -0600
committerMike Greiling <mike@pixelcog.com>2016-12-02 17:43:20 -0600
commited5f22cb93cbabcd2bcf38e7a6b22efb03d7e212 (patch)
treedc22f907cb557d210b82e20e0f65672c3b551d67
parent8732ac4084c1f6a2a5b4e491e32424f738f7a01a (diff)
downloadgitlab-ce-ed5f22cb93cbabcd2bcf38e7a6b22efb03d7e212.tar.gz
satisfy eslint no-param-reassign rule23696-fix-diff-view-highlighting
-rw-r--r--app/assets/javascripts/diff.js.es69
-rw-r--r--app/assets/javascripts/merge_request_tabs.js.es69
2 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/diff.js.es6 b/app/assets/javascripts/diff.js.es6
index 4730d4b4e7b..ecf9d1de81c 100644
--- a/app/assets/javascripts/diff.js.es6
+++ b/app/assets/javascripts/diff.js.es6
@@ -1,6 +1,6 @@
-/* eslint-disable class-methods-use-this, no-param-reassign */
+/* eslint-disable class-methods-use-this */
-((global) => {
+(() => {
const UNFOLD_COUNT = 20;
class Diff {
@@ -104,5 +104,6 @@
}
}
- global.Diff = Diff;
-})(window.gl || (window.gl = {}));
+ window.gl = window.gl || {};
+ window.gl.Diff = Diff;
+})();
diff --git a/app/assets/javascripts/merge_request_tabs.js.es6 b/app/assets/javascripts/merge_request_tabs.js.es6
index 35e869d2e39..583fb9fc03d 100644
--- a/app/assets/javascripts/merge_request_tabs.js.es6
+++ b/app/assets/javascripts/merge_request_tabs.js.es6
@@ -1,4 +1,4 @@
-/* eslint-disable no-new, no-param-reassign, class-methods-use-this */
+/* eslint-disable no-new, class-methods-use-this */
/* global Breakpoints */
/* global Cookies */
/* global DiffNotesApp */
@@ -53,7 +53,7 @@
//
/* eslint-enable max-len */
-((global) => {
+(() => {
// Store the `location` object, allowing for easier stubbing in tests
let location = window.location;
@@ -385,5 +385,6 @@
}
}
- global.MergeRequestTabs = MergeRequestTabs;
-})(window.gl || (window.gl = {}));
+ window.gl = window.gl || {};
+ window.gl.MergeRequestTabs = MergeRequestTabs;
+})();