Commit 83f8a91c authored by Mike Greiling's avatar Mike Greiling

refactor instances of CJS module.exports to ES module syntax

parent 337acf4b
...@@ -14,7 +14,6 @@ import './components/stage_test_component'; ...@@ -14,7 +14,6 @@ import './components/stage_test_component';
import './components/total_time_component'; import './components/total_time_component';
import './cycle_analytics_service'; import './cycle_analytics_service';
import './cycle_analytics_store'; import './cycle_analytics_store';
import './default_event_objects';
Vue.use(Translate); Vue.use(Translate);
......
module.exports = { export default {
issue: { issue: {
created_at: '', created_at: '',
url: '', url: '',
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
* exports HTTP status codes * exports HTTP status codes
*/ */
const statusCodes = { export default {
NO_CONTENT: 204, NO_CONTENT: 204,
OK: 200, OK: 200,
}; };
module.exports = statusCodes;
...@@ -8,7 +8,7 @@ const defaults = { ...@@ -8,7 +8,7 @@ const defaults = {
fileBlobPermalinkUrl: null, fileBlobPermalinkUrl: null,
}; };
class ShortcutsBlob extends Shortcuts { export default class ShortcutsBlob extends Shortcuts {
constructor(opts) { constructor(opts) {
const options = Object.assign({}, defaults, opts); const options = Object.assign({}, defaults, opts);
super(options.skipResetBindings); super(options.skipResetBindings);
...@@ -25,5 +25,3 @@ class ShortcutsBlob extends Shortcuts { ...@@ -25,5 +25,3 @@ class ShortcutsBlob extends Shortcuts {
} }
} }
} }
module.exports = ShortcutsBlob;
class VersionCheckImage { export default class VersionCheckImage {
static bindErrorEvent(imageElement) { static bindErrorEvent(imageElement) {
imageElement.off('error').on('error', () => imageElement.hide()); imageElement.off('error').on('error', () => imageElement.hide());
} }
...@@ -6,5 +6,3 @@ class VersionCheckImage { ...@@ -6,5 +6,3 @@ class VersionCheckImage {
window.gl = window.gl || {}; window.gl = window.gl || {};
gl.VersionCheckImage = VersionCheckImage; gl.VersionCheckImage = VersionCheckImage;
module.exports = VersionCheckImage;
class ClassSpecHelper { export default class ClassSpecHelper {
static itShouldBeAStaticMethod(base, method) { static itShouldBeAStaticMethod(base, method) {
return it('should be a static method', () => { return it('should be a static method', () => {
expect(Object.prototype.hasOwnProperty.call(base, method)).toBeTruthy(); expect(Object.prototype.hasOwnProperty.call(base, method)).toBeTruthy();
...@@ -7,5 +7,3 @@ class ClassSpecHelper { ...@@ -7,5 +7,3 @@ class ClassSpecHelper {
} }
window.ClassSpecHelper = ClassSpecHelper; window.ClassSpecHelper = ClassSpecHelper;
module.exports = ClassSpecHelper;
class FilteredSearchSpecHelper { export default class FilteredSearchSpecHelper {
static createFilterVisualTokenHTML(name, value, isSelected) { static createFilterVisualTokenHTML(name, value, isSelected) {
return FilteredSearchSpecHelper.createFilterVisualToken(name, value, isSelected).outerHTML; return FilteredSearchSpecHelper.createFilterVisualToken(name, value, isSelected).outerHTML;
} }
...@@ -53,5 +53,3 @@ class FilteredSearchSpecHelper { ...@@ -53,5 +53,3 @@ class FilteredSearchSpecHelper {
`; `;
} }
} }
module.exports = FilteredSearchSpecHelper;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment