Commit 57da6321 authored by Lukas Eipert's avatar Lukas Eipert

Run prettier on 30 files: 7 of 8

Mandatory not to break master. Automatically created with prettier.
parent 1e3190b0
......@@ -117,7 +117,7 @@ export default {
<div v-else class="text-secondary">{{ anyUserText }}</div>
</div>
<div class="selectbox" style="display: none;">
<div class="selectbox" style="display: none">
<div class="dropdown">
<button
ref="dropdown"
......
import BoardsListSelector from './boards_list_selector/index';
export default function() {
export default function () {
const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({
propsData: {
......
......@@ -143,9 +143,7 @@ export default {
{{ epic.title }}
</h4>
<gl-popover :target="() => $refs.epicTitle" triggers="hover" placement="top">
<template #title
>{{ epic.title }} &middot; {{ epic.reference }}</template
>
<template #title>{{ epic.title }} &middot; {{ epic.reference }}</template>
<div>{{ epicTimeAgoString }}</div>
<div class="gl-mb-2">{{ epicDateString }}</div>
<gl-link :href="epic.webUrl" class="gl-font-sm">{{ __('Go to epic') }}</gl-link>
......
import BoardsListSelector from './boards_list_selector';
export default function() {
export default function () {
const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({
propsData: {
......
......@@ -84,7 +84,7 @@ export default {
</button>
</div>
<div :class="milestoneTitleClass" class="value">{{ milestoneTitle }}</div>
<div class="selectbox" style="display: none;">
<div class="selectbox" style="display: none">
<input :value="milestoneId" name="milestone_id" type="hidden" />
<div class="dropdown">
<button
......
......@@ -113,9 +113,7 @@ export default {
</template>
<!-- column: Job -->
<template #cell(lastDeployment)="data">
{{ __('deploy') }} #{{ data.value.id }}
</template>
<template #cell(lastDeployment)="data"> {{ __('deploy') }} #{{ data.value.id }} </template>
<!-- column: Pods in use -->
<template #head(rolloutStatus)="data">
......
......@@ -45,7 +45,7 @@ export default {
</div>
<gl-table :items="agents" :fields="fields" stacked="md" data-testid="cluster-agent-list-table">
<template #cell(configuration)=" { item }">
<template #cell(configuration)="{ item }">
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<gl-link v-if="item.configFolder" :href="item.configFolder.webPath">
.gitlab/agents/{{ item.name }}
......
......@@ -76,9 +76,17 @@ export default {
},
},
})
.then(({ data: { environmentsCanaryIngressUpdate: { errors: [error] } } }) => {
this.error = error;
})
.then(
({
data: {
environmentsCanaryIngressUpdate: {
errors: [error],
},
},
}) => {
this.error = error;
},
)
.catch(() => {
this.error = __('Something went wrong. Please try again later');
});
......
......@@ -6,10 +6,10 @@ import { __ } from '~/locale';
import { loadCSSFile } from '~/lib/utils/css_utils';
export default function initLDAPGroupsSelect() {
const ldapGroupResult = function(group) {
const ldapGroupResult = function (group) {
return group.cn;
};
const groupFormatSelection = function(group) {
const groupFormatSelection = function (group) {
return group.cn;
};
import(/* webpackChunkName: 'select2' */ 'select2/select2')
......
......@@ -9,13 +9,9 @@ export default class MembersEE extends Members {
super.addListeners();
// eslint-disable-next-line @gitlab/no-global-event-off
$('.js-ldap-permissions')
.off('click')
.on('click', this.showLDAPPermissionsWarning.bind(this));
$('.js-ldap-permissions').off('click').on('click', this.showLDAPPermissionsWarning.bind(this));
// eslint-disable-next-line @gitlab/no-global-event-off
$('.js-ldap-override')
.off('click')
.on('click', this.toggleMemberAccessToggle.bind(this));
$('.js-ldap-override').off('click').on('click', this.toggleMemberAccessToggle.bind(this));
}
dropdownClicked(options) {
......
......@@ -187,14 +187,20 @@ export default {
},
},
})
.then(({ data: { dastOnDemandScanCreate: { pipelineUrl, errors } } }) => {
if (errors?.length) {
this.showErrors(ERROR_RUN_SCAN, errors);
this.loading = false;
} else {
redirectTo(pipelineUrl);
}
})
.then(
({
data: {
dastOnDemandScanCreate: { pipelineUrl, errors },
},
}) => {
if (errors?.length) {
this.showErrors(ERROR_RUN_SCAN, errors);
this.loading = false;
} else {
redirectTo(pipelineUrl);
}
},
)
.catch(e => {
Sentry.captureException(e);
this.showErrors(ERROR_RUN_SCAN);
......
......@@ -75,9 +75,7 @@ export default {
filteredTimezones() {
const lowerCaseTzSearchTerm = this.tzSearchTerm.toLowerCase();
return this.timezones.filter(tz =>
this.getFormattedTimezone(tz)
.toLowerCase()
.includes(lowerCaseTzSearchTerm),
this.getFormattedTimezone(tz).toLowerCase().includes(lowerCaseTzSearchTerm),
);
},
noResults() {
......
......@@ -107,24 +107,27 @@ export default {
timezone: this.form.timezone.identifier,
},
},
update(
store,
{
data: { oncallScheduleCreate },
},
) {
update(store, { data: { oncallScheduleCreate } }) {
updateStoreOnScheduleCreate(store, getOncallSchedulesQuery, oncallScheduleCreate, {
projectPath,
});
},
})
.then(({ data: { oncallScheduleCreate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
this.$emit('scheduleCreated');
})
.then(
({
data: {
oncallScheduleCreate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
this.$emit('scheduleCreated');
},
)
.catch(error => {
this.error = error;
})
......@@ -144,12 +147,20 @@ export default {
updateStoreAfterScheduleEdit(store, getOncallSchedulesQuery, data, { projectPath });
},
})
.then(({ data: { oncallScheduleUpdate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
})
.then(
({
data: {
oncallScheduleUpdate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
},
)
.catch(error => {
this.error = error;
})
......
......@@ -140,12 +140,20 @@ export default {
},
},
})
.then(({ data: { oncallScheduleRotationCreate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.createScheduleModal.hide();
})
.then(
({
data: {
oncallScheduleRotationCreate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.createScheduleModal.hide();
},
)
.catch(error => {
this.error = error;
})
......
......@@ -95,9 +95,7 @@ export default {
this.clearSearchResults();
},
onOk() {
this.addProjectsToDashboard()
.then(this.clearSearchResults)
.catch(this.clearSearchResults);
this.addProjectsToDashboard().then(this.clearSearchResults).catch(this.clearSearchResults);
},
searched(query) {
this.setSearchQuery(query);
......
......@@ -19,9 +19,7 @@ if (selectElement?.dataset) {
selectElement.appendChild(option);
});
$(selectElement)
.val(selectedOption)
.trigger('change.select2');
$(selectElement).val(selectedOption).trigger('change.select2');
})
.catch(() => new Flash(__('Error loading countries data.')));
}
......@@ -29,18 +29,13 @@ const bindEvents = () => {
function hideNonRootParentPathOptions() {
const rootParent = `/${
$namespaceSelect
.find('option:selected')
.data('show-path')
.split('/')[1]
$namespaceSelect.find('option:selected').data('show-path').split('/')[1]
}`;
$namespaceSelect
.find('option')
.filter(function doesNotMatchParent() {
return !$(this)
.data('show-path')
.includes(rootParent);
return !$(this).data('show-path').includes(rootParent);
})
.addClass('hidden');
}
......@@ -100,10 +95,7 @@ const bindEvents = () => {
),
);
$projectFieldsForm
.find('.js-select-namespace')
.first()
.val(groupId);
$projectFieldsForm.find('.js-select-namespace').first().val(groupId);
}
$useCustomTemplateBtn.on('change', chooseTemplate);
......
import $ from 'jquery';
import Tracking from '~/tracking';
export default function(assigneeDropdown) {
export default function (assigneeDropdown) {
const trackEvent = 'show_invite_members';
const trackLabel = 'edit_assignee';
......
......@@ -274,8 +274,8 @@ export default {
<gl-button
:disabled="
requirementRequestActive ||
issuableMeta.issuableTitle.length > $options.maxTitleLength ||
!issuableMeta.issuableTitle.length
issuableMeta.issuableTitle.length > $options.maxTitleLength ||
!issuableMeta.issuableTitle.length
"
:loading="requirementRequestActive"
data-testid="requirement-save"
......
......@@ -123,8 +123,10 @@ export default {
getEmptyRowContainerStyles() {
if (this.$refs.epicItems && this.$refs.epicItems.length) {
return {
height: `${this.$el.clientHeight -
this.displayedEpics.length * this.$refs.epicItems[0].$el.clientHeight}px`,
height: `${
this.$el.clientHeight -
this.displayedEpics.length * this.$refs.epicItems[0].$el.clientHeight
}px`,
};
}
return {};
......
......@@ -109,7 +109,10 @@ export default {
emptyDataSet() {
const formattedStartDate = formatDate(this.startDate, ISO_DATE);
const formattedEndDate = formatDate(Date.now(), ISO_DATE);
return [[formattedStartDate, 0], [formattedEndDate, 0]];
return [
[formattedStartDate, 0],
[formattedEndDate, 0],
];
},
},
watch: {
......
......@@ -27,12 +27,7 @@ const getHeaders = res => res.headers;
* @param {{headers}}
* @returns {{pageInfo: {}}}
*/
const pageInfo = flow(
getHeaders,
normalizeHeaders,
parseIntPagination,
groupPageInfo,
);
const pageInfo = flow(getHeaders, normalizeHeaders, parseIntPagination, groupPageInfo);
/**
* Takes an XHR-response object and adds pagination related data do it
......
......@@ -149,9 +149,7 @@ export default {
<gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" />
<span v-else class="js-weight-collapsed-weight-label">
{{ collapsedWeightLabel
}}<template v-if="weight > $options.maxDisplayWeight"
>&hellip;</template
>
}}<template v-if="weight > $options.maxDisplayWeight">&hellip;</template>
</span>
</div>
<div class="title hide-collapsed">
......
......@@ -121,7 +121,7 @@ export default {
:description="purchasedUsage.description"
css-class="gl-ml-4"
>
<template #footer="{link}">
<template #footer="{ link }">
<gl-button
target="_blank"
:href="link.url"
......
......@@ -51,9 +51,7 @@ export default {
<template v-else>
{{ issue.name }}
</template>
<template v-if="issueDelta">
({{ issueDelta }})
</template>
<template v-if="issueDelta"> ({{ issueDelta }}) </template>
</div>
<report-link v-if="issue.path" :issue="issue" />
......
import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key';
import { stateKey } from './state_maps';
export default function() {
export default function () {
if (this.isGeoSecondaryNode) {
return 'geoSecondaryNode';
}
......
......@@ -24,7 +24,10 @@ export default {
state.projects = projects;
state.isLoadingProjects = false;
if (AccessorUtilities.isLocalStorageAccessSafe()) {
localStorage.setItem(state.projectEndpoints.list, state.projects.map(p => p.id));
localStorage.setItem(
state.projectEndpoints.list,
state.projects.map(p => p.id),
);
} else {
createFlash(
__('Project order will not be saved as local storage is not available.'),
......@@ -63,7 +66,10 @@ export default {
);
state.isLoadingProjects = false;
if (AccessorUtilities.isLocalStorageAccessSafe()) {
localStorage.setItem(state.projectEndpoints.list, state.projects.map(p => p.id));
localStorage.setItem(
state.projectEndpoints.list,
state.projects.map(p => p.id),
);
}
const pageInfo = parseIntPagination(normalizeHeaders(headers));
......
......@@ -65,7 +65,7 @@ export default {
variant="warning"
category="secondary"
data-qa-selector="dismiss_with_comment_button"
class="js-dismiss-with-comment "
class="js-dismiss-with-comment"
:aria-label="s__('vulnerability|Add comment and dismiss')"
icon="comment"
@click="$emit('openDismissalCommentBox')"
......
......@@ -73,7 +73,8 @@ export default {
return Boolean(
!this.isResolved &&
this.remediation?.diff?.length > 0 &&
(!this.vulnerability.hasMergeRequest && this.remediation),
!this.vulnerability.hasMergeRequest &&
this.remediation,
);
},
isResolved() {
......
......@@ -56,11 +56,7 @@ describe('Activities', () => {
const testName = shouldHighlight ? 'should highlight' : 'should not highlight';
it(`${testName} ${getEventName(x)}`, () => {
expect(
$(getSelector(x))
.parent()
.hasClass('active'),
).toEqual(shouldHighlight);
expect($(getSelector(x)).parent().hasClass('active')).toEqual(shouldHighlight);
});
})(x);
}
......
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