Commit 35a069ae authored by Vitaly Slobodin's avatar Vitaly Slobodin

Set names to unnamed functions

Resolve ESLint warning about unexpected
unnamed functions.
parent f14bd87c
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import StatisticsPanelApp from './components/app.vue'; import StatisticsPanelApp from './components/app.vue';
import createStore from './store'; import createStore from './store';
export default function (el) { export default function initStatisticsPanel(el) {
if (!el) { if (!el) {
return false; return false;
} }
......
...@@ -5,7 +5,7 @@ import App from './components/app.vue'; ...@@ -5,7 +5,7 @@ import App from './components/app.vue';
Vue.use(VueApollo); Vue.use(VueApollo);
export default function () { export default function initIssuableSuggestions() {
const el = document.getElementById('js-suggestions'); const el = document.getElementById('js-suggestions');
const issueTitle = document.getElementById('issue_title'); const issueTitle = document.getElementById('issue_title');
const { projectPath } = el.dataset; const { projectPath } = el.dataset;
......
import ZenMode from '~/zen_mode'; import ZenMode from '~/zen_mode';
import GLForm from '~/gl_form'; import GLForm from '~/gl_form';
export default function ($formEl) { export default function initProjectForm($formEl) {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
new GLForm($formEl); // eslint-disable-line no-new new GLForm($formEl); // eslint-disable-line no-new
} }
...@@ -16,7 +16,7 @@ import initInviteMemberModal from '~/invite_member/init_invite_member_modal'; ...@@ -16,7 +16,7 @@ import initInviteMemberModal from '~/invite_member/init_invite_member_modal';
import { IssuableType } from '~/issuable_show/constants'; import { IssuableType } from '~/issuable_show/constants';
export default function () { export default function initShowIssue() {
const initialDataEl = document.getElementById('js-issuable-app'); const initialDataEl = document.getElementById('js-issuable-app');
const { issueType, ...issuableData } = parseIssuableData(initialDataEl); const { issueType, ...issuableData } = parseIssuableData(initialDataEl);
......
...@@ -10,7 +10,7 @@ import initInviteMemberTrigger from '~/invite_member/init_invite_member_trigger' ...@@ -10,7 +10,7 @@ import initInviteMemberTrigger from '~/invite_member/init_invite_member_trigger'
import initInviteMemberModal from '~/invite_member/init_invite_member_modal'; import initInviteMemberModal from '~/invite_member/init_invite_member_modal';
import StatusBox from '~/merge_request/components/status_box.vue'; import StatusBox from '~/merge_request/components/status_box.vue';
export default function () { export default function initMergeRequestShow() {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar(); initIssuableSidebar();
initPipelines(); initPipelines();
......
...@@ -77,7 +77,7 @@ const createTestDetails = () => { ...@@ -77,7 +77,7 @@ const createTestDetails = () => {
}); });
}; };
export default async function () { export default async function initPipelineDetailsBundle() {
createTestDetails(); createTestDetails();
createDagApp(); createDagApp();
......
import Vue from 'vue'; import Vue from 'vue';
import NewProjectCreationApp from './components/app.vue'; import NewProjectCreationApp from './components/app.vue';
export default function (el, props) { export default function initNewProjectCreation(el, props) {
return new Vue({ return new Vue({
el, el,
components: { components: {
......
...@@ -86,7 +86,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa ...@@ -86,7 +86,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa
* @param {Object<string, { message: string, isValid: ?function}>} customFeedbackMap * @param {Object<string, { message: string, isValid: ?function}>} customFeedbackMap
* @returns {{ inserted: function, update: function }} validateDirective * @returns {{ inserted: function, update: function }} validateDirective
*/ */
export default function (customFeedbackMap = {}) { export default function initValidation(customFeedbackMap = {}) {
const feedbackMap = merge(defaultFeedbackMap, customFeedbackMap); const feedbackMap = merge(defaultFeedbackMap, customFeedbackMap);
const elDataMap = new WeakMap(); const elDataMap = new WeakMap();
......
import BoardsListSelector from './boards_list_selector/index'; import BoardsListSelector from './boards_list_selector/index';
export default function () { export default function initAssigneesListSelector() {
const $addListEl = document.querySelector('#js-add-list'); const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({ return new BoardsListSelector({
propsData: { propsData: {
......
import BoardsListSelector from './boards_list_selector'; import BoardsListSelector from './boards_list_selector';
export default function () { export default function initMilestoneListSelector() {
const $addListEl = document.querySelector('#js-add-list'); const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({ return new BoardsListSelector({
propsData: { propsData: {
......
...@@ -23,7 +23,7 @@ const disableMergeTrains = () => { ...@@ -23,7 +23,7 @@ const disableMergeTrains = () => {
mergeTrainsCheckbox.checked = false; mergeTrainsCheckbox.checked = false;
}; };
export default function () { export default function initMergeOptions() {
const { projectFullPath } = containerEl.dataset; const { projectFullPath } = containerEl.dataset;
const defaultClient = createDefaultClient(); const defaultClient = createDefaultClient();
......
import $ from 'jquery'; import $ from 'jquery';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
export default function (assigneeDropdown) { export default function initTrackInviteMembers(assigneeDropdown) {
const trackEvent = 'show_invite_members'; const trackEvent = 'show_invite_members';
const trackLabel = 'edit_assignee'; const trackLabel = 'edit_assignee';
......
import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key'; import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key';
import { stateKey } from './state_maps'; import { stateKey } from './state_maps';
export default function () { export default function getStateKey() {
if (this.isGeoSecondaryNode) { if (this.isGeoSecondaryNode) {
return 'geoSecondaryNode'; return 'geoSecondaryNode';
} }
......
...@@ -6,7 +6,7 @@ import { getIdFromGraphQLId } from '~/graphql_shared/utils'; ...@@ -6,7 +6,7 @@ import { getIdFromGraphQLId } from '~/graphql_shared/utils';
Vue.use(VueApollo); Vue.use(VueApollo);
export default function () { export default function initIterationsDropdownBundle() {
const el = document.querySelector('#js-iteration-dropdown'); const el = document.querySelector('#js-iteration-dropdown');
const iterationField = document.getElementById('issue_iteration_id'); const iterationField = document.getElementById('issue_iteration_id');
......
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