summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2018-01-08 18:08:32 -0500
committerJacob Schatz <jschatz1@gmail.com>2018-01-08 18:08:32 -0500
commit2bd4453ca2c4bec527a264194cf12d164cd31ed7 (patch)
tree5f71381e74684fbfb29506d27b898e4a566ae49c
parent8d677bb1560d895d66876a9dbd7d877cfd8e4440 (diff)
downloadgitlab-ce-2bd4453ca2c4bec527a264194cf12d164cd31ed7.tar.gz
Fix eslint
-rw-r--r--app/assets/javascripts/dispatcher.js14
-rw-r--r--app/assets/javascripts/pages/explore/groups/index.js6
-rw-r--r--app/assets/javascripts/pages/explore/projects/index.js4
3 files changed, 11 insertions, 13 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index f7421ea415d..11ec667fc07 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -38,12 +38,10 @@ import BindInOut from './behaviors/bind_in_out';
import SecretValues from './behaviors/secret_values';
import DeleteModal from './branches/branches_delete_modal';
import Group from './group';
-import GroupsList from './groups_list';
import ProjectsList from './projects_list';
import setupProjectEdit from './project_edit';
import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
-import Landing from './landing';
import BlobForkSuggestion from './blob/blob_fork_suggestion';
import UserCallout from './user_callout';
import ShortcutsWiki from './shortcuts_wiki';
@@ -218,7 +216,7 @@ import Activities from './activities';
case 'explore:projects:trending':
case 'explore:projects:starred':
import('./pages/explore/projects')
- .then(module => module.default())
+ .then(callDefault)
.catch(fail);
break;
case 'dashboard:projects:index':
@@ -228,7 +226,7 @@ import Activities from './activities';
break;
case 'explore:groups:index':
import('./pages/explore/groups')
- .then(module => module.default())
+ .then(callDefault)
.catch(fail);
break;
case 'projects:milestones:new':
@@ -498,8 +496,8 @@ import Activities from './activities';
break;
case 'projects:forks:new':
import(/* webpackChunkName: 'project_fork' */ './project_fork')
- .then(fork => fork.default())
- .catch(() => {});
+ .then(callDefault)
+ .catch(fail);
break;
case 'projects:artifacts:browse':
new ShortcutsNavigation();
@@ -635,8 +633,8 @@ import Activities from './activities';
shortcut_handler = new ShortcutsNavigation();
new ProjectNew();
import(/* webpackChunkName: 'project_permissions' */ './projects/permissions')
- .then(permissions => permissions.default())
- .catch(() => {});
+ .then(callDefault)
+ .catch(fail);
break;
case 'new':
new ProjectNew();
diff --git a/app/assets/javascripts/pages/explore/groups/index.js b/app/assets/javascripts/pages/explore/groups/index.js
index 6515202a31b..859b073f1cb 100644
--- a/app/assets/javascripts/pages/explore/groups/index.js
+++ b/app/assets/javascripts/pages/explore/groups/index.js
@@ -1,14 +1,14 @@
import GroupsList from '~/groups_list';
import Landing from '~/landing';
-export default function() {
- new GroupsList();
+export default function () {
+ new GroupsList(); // eslint-disable-line no-new
const landingElement = document.querySelector('.js-explore-groups-landing');
if (!landingElement) return;
const exploreGroupsLanding = new Landing(
landingElement,
landingElement.querySelector('.dismiss-button'),
- 'explore_groups_landing_dismissed'
+ 'explore_groups_landing_dismissed',
);
exploreGroupsLanding.toggle();
}
diff --git a/app/assets/javascripts/pages/explore/projects/index.js b/app/assets/javascripts/pages/explore/projects/index.js
index 2259cb7a5cf..93acb54d4f1 100644
--- a/app/assets/javascripts/pages/explore/projects/index.js
+++ b/app/assets/javascripts/pages/explore/projects/index.js
@@ -1,5 +1,5 @@
import ProjectsList from '~/projects_list';
-export default function() {
- new ProjectsList();
+export default function () {
+ new ProjectsList(); // eslint-disable-line no-new
}