Commit a42b2270 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'fix-vue-no-lone-template' into 'master'

Fix vue/no-lone-template violations

See merge request gitlab-org/gitlab!51393
parents 05a199dc 260cbd35
...@@ -51,7 +51,6 @@ rules: ...@@ -51,7 +51,6 @@ rules:
# new ones, to ease migration to v7, so violations of each can be fixed # new ones, to ease migration to v7, so violations of each can be fixed
# separately. # separately.
vue/no-mutating-props: off vue/no-mutating-props: off
vue/no-lone-template: off
# END eslint-plugin-vue@7 overrides # END eslint-plugin-vue@7 overrides
overrides: overrides:
- files: - files:
......
...@@ -88,7 +88,6 @@ export default { ...@@ -88,7 +88,6 @@ export default {
</gl-button> </gl-button>
</div> </div>
</template> </template>
<template>
<gl-datepicker <gl-datepicker
ref="datePicker" ref="datePicker"
:value="parsedDueDate" :value="parsedDueDate"
...@@ -96,7 +95,6 @@ export default { ...@@ -96,7 +95,6 @@ export default {
@input="setDueDate" @input="setDueDate"
@clear="setDueDate(null)" @clear="setDueDate(null)"
/> />
</template>
</board-editable-item> </board-editable-item>
</template> </template>
<style> <style>
......
...@@ -136,7 +136,6 @@ export default { ...@@ -136,7 +136,6 @@ export default {
<template #collapsed> <template #collapsed>
<span class="gl-text-gray-800">{{ issue.referencePath }}</span> <span class="gl-text-gray-800">{{ issue.referencePath }}</span>
</template> </template>
<template>
<gl-alert v-if="showChangesAlert" variant="warning" class="gl-mb-5" :dismissible="false"> <gl-alert v-if="showChangesAlert" variant="warning" class="gl-mb-5" :dismissible="false">
{{ $options.i18n.reviewYourChanges }} {{ $options.i18n.reviewYourChanges }}
</gl-alert> </gl-alert>
...@@ -166,6 +165,5 @@ export default { ...@@ -166,6 +165,5 @@ export default {
</gl-button> </gl-button>
</div> </div>
</gl-form> </gl-form>
</template>
</board-editable-item> </board-editable-item>
</template> </template>
...@@ -122,7 +122,6 @@ export default { ...@@ -122,7 +122,6 @@ export default {
<template v-if="hasMilestone" #collapsed> <template v-if="hasMilestone" #collapsed>
<strong class="gl-text-gray-900">{{ activeIssue.milestone.title }}</strong> <strong class="gl-text-gray-900">{{ activeIssue.milestone.title }}</strong>
</template> </template>
<template>
<gl-dropdown <gl-dropdown
ref="dropdown" ref="dropdown"
:text="dropdownText" :text="dropdownText"
...@@ -156,6 +155,5 @@ export default { ...@@ -156,6 +155,5 @@ export default {
{{ $options.i18n.noMilestonesFound }} {{ $options.i18n.noMilestonesFound }}
</gl-dropdown-text> </gl-dropdown-text>
</gl-dropdown> </gl-dropdown>
</template>
</board-editable-item> </board-editable-item>
</template> </template>
...@@ -131,7 +131,6 @@ export default { ...@@ -131,7 +131,6 @@ export default {
:title="modalTitle" :title="modalTitle"
kind="danger" kind="danger"
> >
<template>
<p>{{ warningMessage }}</p> <p>{{ warningMessage }}</p>
<div v-if="confirmCleanup"> <div v-if="confirmCleanup">
{{ s__('ClusterIntegration|This will permanently delete the following resources:') }} {{ s__('ClusterIntegration|This will permanently delete the following resources:') }}
...@@ -172,7 +171,6 @@ export default { ...@@ -172,7 +171,6 @@ export default {
'ClusterIntegration|If you do not wish to delete all associated GitLab resources, you can simply remove the integration.', 'ClusterIntegration|If you do not wish to delete all associated GitLab resources, you can simply remove the integration.',
) )
}}</span> }}</span>
</template>
<template #modal-footer> <template #modal-footer>
<gl-button variant="secondary" @click="handleCancel">{{ s__('Cancel') }}</gl-button> <gl-button variant="secondary" @click="handleCancel">{{ s__('Cancel') }}</gl-button>
<template v-if="confirmCleanup"> <template v-if="confirmCleanup">
......
...@@ -68,7 +68,6 @@ export default { ...@@ -68,7 +68,6 @@ export default {
<span data-testid="feature-flags-tab-title">{{ title }}</span> <span data-testid="feature-flags-tab-title">{{ title }}</span>
<gl-badge size="sm" class="gl-tab-counter-badge">{{ itemCount }}</gl-badge> <gl-badge size="sm" class="gl-tab-counter-badge">{{ itemCount }}</gl-badge>
</template> </template>
<template>
<gl-alert <gl-alert
v-for="(message, index) in alerts" v-for="(message, index) in alerts"
:key="index" :key="index"
...@@ -103,6 +102,5 @@ export default { ...@@ -103,6 +102,5 @@ export default {
</template> </template>
</gl-empty-state> </gl-empty-state>
<slot> </slot> <slot> </slot>
</template>
</gl-tab> </gl-tab>
</template> </template>
...@@ -201,9 +201,7 @@ export default { ...@@ -201,9 +201,7 @@ export default {
/> />
<template v-else>{{ clusterNameOrLink.name }}</template> <template v-else>{{ clusterNameOrLink.name }}</template>
</template> </template>
<template #kubernetesNamespace> <template #kubernetesNamespace>{{ kubernetesNamespace }}</template>
<template>{{ kubernetesNamespace }}</template>
</template>
<template #deploymentLink> <template #deploymentLink>
<gl-link <gl-link
:href="deploymentLink.path" :href="deploymentLink.path"
......
...@@ -85,7 +85,6 @@ export default { ...@@ -85,7 +85,6 @@ export default {
<template> <template>
<gl-modal ref="modal" modal-id="delete-user-modal" :title="modalTitle" kind="danger"> <gl-modal ref="modal" modal-id="delete-user-modal" :title="modalTitle" kind="danger">
<template>
<p> <p>
<gl-sprintf :message="content"> <gl-sprintf :message="content">
<template #username> <template #username>
...@@ -116,7 +115,6 @@ export default { ...@@ -116,7 +115,6 @@ export default {
autocomplete="off" autocomplete="off"
/> />
</form> </form>
</template>
<template #modal-footer> <template #modal-footer>
<gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button> <gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button>
<gl-button <gl-button
......
...@@ -123,7 +123,6 @@ export default { ...@@ -123,7 +123,6 @@ export default {
:width="`${containerMeasurements.width}px`" :width="`${containerMeasurements.width}px`"
:height="`${containerMeasurements.height}px`" :height="`${containerMeasurements.height}px`"
> >
<template>
<path <path
v-for="link in links" v-for="link in links"
:key="link.path" :key="link.path"
...@@ -133,7 +132,6 @@ export default { ...@@ -133,7 +132,6 @@ export default {
:class="getLinkClasses(link)" :class="getLinkClasses(link)"
:stroke-width="$options.STROKE_WIDTH" :stroke-width="$options.STROKE_WIDTH"
/> />
</template>
</svg> </svg>
<slot></slot> <slot></slot>
</div> </div>
......
...@@ -224,7 +224,6 @@ export default { ...@@ -224,7 +224,6 @@ export default {
data-testid="graph-container" data-testid="graph-container"
> >
<svg :viewBox="viewBox" :width="width" :height="height" class="gl-absolute"> <svg :viewBox="viewBox" :width="width" :height="height" class="gl-absolute">
<template>
<path <path
v-for="link in links" v-for="link in links"
:key="link.path" :key="link.path"
...@@ -234,7 +233,6 @@ export default { ...@@ -234,7 +233,6 @@ export default {
:class="getLinkClasses(link)" :class="getLinkClasses(link)"
:stroke-width="$options.STROKE_WIDTH" :stroke-width="$options.STROKE_WIDTH"
/> />
</template>
</svg> </svg>
<div <div
v-for="(stage, index) in pipelineStages" v-for="(stage, index) in pipelineStages"
......
...@@ -69,7 +69,6 @@ export default { ...@@ -69,7 +69,6 @@ export default {
<div v-else-if="isInstalled"> <div v-else-if="isInstalled">
<div v-if="hasFunctionData"> <div v-if="hasFunctionData">
<template>
<div class="groups-list-tree-container js-functions-wrapper"> <div class="groups-list-tree-container js-functions-wrapper">
<ul class="content-list group-list-tree"> <ul class="content-list group-list-tree">
<environment-row <environment-row
...@@ -80,7 +79,6 @@ export default { ...@@ -80,7 +79,6 @@ export default {
/> />
</ul> </ul>
</div> </div>
</template>
<gl-loading-icon v-if="isLoading" size="lg" class="gl-mt-3 gl-mb-3 js-functions-loader" /> <gl-loading-icon v-if="isLoading" size="lg" class="gl-mt-3 gl-mb-3 js-functions-loader" />
</div> </div>
<div v-else class="empty-state js-empty-state"> <div v-else class="empty-state js-empty-state">
......
...@@ -22,11 +22,6 @@ export default { ...@@ -22,11 +22,6 @@ export default {
<template> <template>
<gl-drawer class="gl-pt-8" :open="isOpen" @close="$emit('close')"> <gl-drawer class="gl-pt-8" :open="isOpen" @close="$emit('close')">
<template #header>{{ __('Page settings') }}</template> <template #header>{{ __('Page settings') }}</template>
<template> <front-matter-controls :settings="settings" @updateSettings="$emit('updateSettings', $event)" />
<front-matter-controls
:settings="settings"
@updateSettings="$emit('updateSettings', $event)"
/>
</template>
</gl-drawer> </gl-drawer>
</template> </template>
...@@ -36,10 +36,8 @@ export default { ...@@ -36,10 +36,8 @@ export default {
aria-expanded="false" aria-expanded="false"
> >
<gl-loading-icon v-show="isLoading" :inline="true" /> <gl-loading-icon v-show="isLoading" :inline="true" />
<template>
<slot v-if="$slots.default"></slot> <slot v-if="$slots.default"></slot>
<span v-else class="dropdown-toggle-text"> {{ toggleText }} </span> <span v-else class="dropdown-toggle-text"> {{ toggleText }} </span>
</template>
<gl-icon <gl-icon
v-show="!isLoading" v-show="!isLoading"
class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-500" class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-500"
......
...@@ -60,9 +60,7 @@ export default { ...@@ -60,9 +60,7 @@ export default {
</div> </div>
<span v-if="canAttachFile" class="uploading-container"> <span v-if="canAttachFile" class="uploading-container">
<span class="uploading-progress-container hide"> <span class="uploading-progress-container hide">
<template>
<gl-icon name="media" /> <gl-icon name="media" />
</template>
<span class="attaching-file-message"></span> <span class="attaching-file-message"></span>
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings --> <!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
<span class="uploading-progress">0%</span> <span class="uploading-progress">0%</span>
......
...@@ -144,7 +144,6 @@ export default { ...@@ -144,7 +144,6 @@ export default {
</slot> </slot>
</template> </template>
<template>
<slot name="label-dropdown-list-header"> <slot name="label-dropdown-list-header">
<gl-dropdown-section-header>{{ __('Select a label') }} </gl-dropdown-section-header> <gl-dropdown-section-header>{{ __('Select a label') }} </gl-dropdown-section-header>
</slot> </slot>
...@@ -178,6 +177,5 @@ export default { ...@@ -178,6 +177,5 @@ export default {
{{ __('No matching labels') }} {{ __('No matching labels') }}
</div> </div>
</div> </div>
</template>
</gl-dropdown> </gl-dropdown>
</template> </template>
...@@ -51,7 +51,6 @@ export default { ...@@ -51,7 +51,6 @@ export default {
> >
<template #header>{{ __('Issue details') }}</template> <template #header>{{ __('Issue details') }}</template>
<template>
<board-sidebar-issue-title /> <board-sidebar-issue-title />
<board-assignee-dropdown /> <board-assignee-dropdown />
<board-sidebar-epic-select /> <board-sidebar-epic-select />
...@@ -61,6 +60,5 @@ export default { ...@@ -61,6 +60,5 @@ export default {
<board-sidebar-labels-select /> <board-sidebar-labels-select />
<board-sidebar-weight-input v-if="glFeatures.issueWeights" /> <board-sidebar-weight-input v-if="glFeatures.issueWeights" />
<board-sidebar-subscription /> <board-sidebar-subscription />
</template>
</gl-drawer> </gl-drawer>
</template> </template>
...@@ -81,7 +81,6 @@ export default { ...@@ -81,7 +81,6 @@ export default {
{{ storedEpic.title }} {{ storedEpic.title }}
</a> </a>
</template> </template>
<template>
<epics-select <epics-select
ref="epicSelect" ref="epicSelect"
class="gl-w-full" class="gl-w-full"
...@@ -93,6 +92,5 @@ export default { ...@@ -93,6 +92,5 @@ export default {
:show-header="false" :show-header="false"
@onEpicSelect="setEpic" @onEpicSelect="setEpic"
/> />
</template>
</board-editable-item> </board-editable-item>
</template> </template>
...@@ -87,7 +87,6 @@ export default { ...@@ -87,7 +87,6 @@ export default {
</gl-button> </gl-button>
</div> </div>
</template> </template>
<template>
<gl-form @submit.prevent="handleFormSubmit()"> <gl-form @submit.prevent="handleFormSubmit()">
<gl-form-input <gl-form-input
v-model.number="weight" v-model.number="weight"
...@@ -97,6 +96,5 @@ export default { ...@@ -97,6 +96,5 @@ export default {
:placeholder="__('Enter a number')" :placeholder="__('Enter a number')"
/> />
</gl-form> </gl-form>
</template>
</board-editable-item> </board-editable-item>
</template> </template>
...@@ -233,9 +233,7 @@ export default { ...@@ -233,9 +233,7 @@ export default {
@cancel="hideNodeActionModal" @cancel="hideNodeActionModal"
@ok="handleNodeAction" @ok="handleNodeAction"
> >
<template>
{{ modalMessage }} {{ modalMessage }}
</template>
</gl-modal> </gl-modal>
</div> </div>
</template> </template>
...@@ -144,10 +144,8 @@ export default { ...@@ -144,10 +144,8 @@ export default {
:options="$options.selectOptions" :options="$options.selectOptions"
/> />
</div> </div>
<template name="valid-feedback"> <template v-if="showValidFeedback" #description>
<gl-form-text v-show="showValidFeedback" class="gl-font-base gl-text-gray-400!">
{{ $options.i18n.validFeedback }} {{ $options.i18n.validFeedback }}
</gl-form-text>
</template> </template>
</gl-form-group> </gl-form-group>
<gl-button variant="success" type="submit" :disabled="disableSubmit" :loading="loading"> <gl-button variant="success" type="submit" :disabled="disableSubmit" :loading="loading">
......
...@@ -93,13 +93,12 @@ export default { ...@@ -93,13 +93,12 @@ export default {
@primary.prevent="onUpload" @primary.prevent="onUpload"
> >
<p>{{ $options.i18n.modalDescription }}</p> <p>{{ $options.i18n.modalDescription }}</p>
<gl-form-group :label="__('URL')" label-for="upload-url-input"> <gl-form-group
:label="__('URL')"
label-for="upload-url-input"
:description="s__('Incidents|Must start with http or https')"
>
<gl-form-input id="upload-url-input" v-model="modalUrl" /> <gl-form-input id="upload-url-input" v-model="modalUrl" />
<template name="description">
<p class="gl-text-gray-500 gl-mt-3 gl-mb-0">
{{ s__('Incidents|Must start with http or https') }}
</p>
</template>
</gl-form-group> </gl-form-group>
</gl-modal> </gl-modal>
<metrics-image v-for="metric in metricImages" :key="metric.id" v-bind="metric" /> <metrics-image v-for="metric in metricImages" :key="metric.id" v-bind="metric" />
......
...@@ -246,7 +246,6 @@ export default { ...@@ -246,7 +246,6 @@ export default {
/> />
</div> </div>
</template> </template>
<template>
<issuable-body <issuable-body
:issuable="requirementObject" :issuable="requirementObject"
:enable-edit="canEditRequirement" :enable-edit="canEditRequirement"
...@@ -298,6 +297,5 @@ export default { ...@@ -298,6 +297,5 @@ export default {
</div> </div>
</template> </template>
</issuable-body> </issuable-body>
</template>
</gl-drawer> </gl-drawer>
</template> </template>
...@@ -277,7 +277,6 @@ export default { ...@@ -277,7 +277,6 @@ export default {
</div> </div>
</div> </div>
</template> </template>
<template>
<div v-if="hasSelectedPolicy"> <div v-if="hasSelectedPolicy">
<policy-drawer v-if="shouldShowCiliumDrawer" v-model="selectedPolicy.manifest" /> <policy-drawer v-if="shouldShowCiliumDrawer" v-model="selectedPolicy.manifest" />
...@@ -299,7 +298,6 @@ export default { ...@@ -299,7 +298,6 @@ export default {
<p>{{ s__('NetworkPolicies|Choose whether to enforce this policy.') }}</p> <p>{{ s__('NetworkPolicies|Choose whether to enforce this policy.') }}</p>
<gl-toggle v-model="selectedPolicy.isEnabled" data-testid="policyToggle" /> <gl-toggle v-model="selectedPolicy.isEnabled" data-testid="policyToggle" />
</div> </div>
</template>
</gl-drawer> </gl-drawer>
</div> </div>
</template> </template>
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
:aria-describedby="`js-${option.value}-license-radio`" :aria-describedby="`js-${option.value}-license-radio`"
:class="{ 'mb-3': isDescriptionEnabled }" :class="{ 'mb-3': isDescriptionEnabled }"
> >
<template>{{ option.label }}</template> {{ option.label }}
<div v-if="isDescriptionEnabled" class="text-secondary"> <div v-if="isDescriptionEnabled" class="text-secondary">
{{ option.description }} {{ option.description }}
</div> </div>
......
...@@ -59,16 +59,6 @@ exports[`Alert integration settings form should match the default snapshot 1`] = ...@@ -59,16 +59,6 @@ exports[`Alert integration settings form should match the default snapshot 1`] =
value="minutes" value="minutes"
/> />
</div> </div>
<gl-form-text-stub
class="gl-font-base gl-text-gray-400!"
tag="small"
textvariant="muted"
>
Time limit must be a multiple of 15 minutes
</gl-form-text-stub>
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub <gl-button-stub
......
...@@ -7,7 +7,9 @@ exports[`AddLicenseForm template does not show radio button descriptions, if lic ...@@ -7,7 +7,9 @@ exports[`AddLicenseForm template does not show radio button descriptions, if lic
data-qa-selector="approved_license_radio" data-qa-selector="approved_license_radio"
value="approved" value="approved"
> >
Allow Allow
<!----> <!---->
</gl-form-radio-stub> </gl-form-radio-stub>
`; `;
...@@ -19,7 +21,9 @@ exports[`AddLicenseForm template does not show radio button descriptions, if lic ...@@ -19,7 +21,9 @@ exports[`AddLicenseForm template does not show radio button descriptions, if lic
data-qa-selector="blacklisted_license_radio" data-qa-selector="blacklisted_license_radio"
value="blacklisted" value="blacklisted"
> >
Deny Deny
<!----> <!---->
</gl-form-radio-stub> </gl-form-radio-stub>
`; `;
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