Commit f829b181 authored by Mike Greiling's avatar Mike Greiling

Resolve eslint-plugin-vue errors

The eslint-plugin-vue upgrade had some breaking changes to
vue/attribute-order which needed to be resolved in order to avoid
disabling the rule entirely
parent 0f50ba47
...@@ -90,3 +90,10 @@ rules: ...@@ -90,3 +90,10 @@ rules:
- allowElseIf: true - allowElseIf: true
import/no-useless-path-segments: off import/no-useless-path-segments: off
lines-between-class-members: off lines-between-class-members: off
# Disabled for now, to make the plugin-vue 4.5 -> 5.0 update smoother
vue/html-closing-bracket-newline: off
vue/html-closing-bracket-spacing: off
vue/no-confusing-v-for-v-if: error
vue/no-unused-components: off
vue/no-use-v-if-with-v-for: off
vue/no-v-html: off
...@@ -103,8 +103,8 @@ export default { ...@@ -103,8 +103,8 @@ export default {
</div> </div>
<button <button
v-tooltip
v-show="hasError" v-show="hasError"
v-tooltip
:title="s__('Badges|Reload badge image')" :title="s__('Badges|Reload badge image')"
class="btn btn-transparent btn-sm text-primary" class="btn btn-transparent btn-sm text-primary"
type="button" type="button"
......
...@@ -231,14 +231,14 @@ export default { ...@@ -231,14 +231,14 @@ export default {
<board-card <board-card
v-for="(issue, index) in issues" v-for="(issue, index) in issues"
ref="issue" ref="issue"
:key="issue.id"
:index="index" :index="index"
:list="list" :list="list"
:issue="issue" :issue="issue"
:issue-link-base="issueLinkBase" :issue-link-base="issueLinkBase"
:group-id="groupId" :group-id="groupId"
:root-path="rootPath" :root-path="rootPath"
:disabled="disabled" :disabled="disabled" />
:key="issue.id" />
<li <li
v-if="showCount" v-if="showCount"
class="board-list-count text-center" class="board-list-count text-center"
......
...@@ -110,9 +110,9 @@ export default { ...@@ -110,9 +110,9 @@ export default {
Title Title
</label> </label>
<input <input
:id="list.id + '-title'"
ref="input" ref="input"
v-model="title" v-model="title"
:id="list.id + '-title'"
class="form-control" class="form-control"
type="text" type="text"
name="issue_title" name="issue_title"
......
...@@ -170,8 +170,8 @@ ...@@ -170,8 +170,8 @@
tooltip-placement="bottom" tooltip-placement="bottom"
/> />
<span <span
v-tooltip
v-if="shouldRenderCounter" v-if="shouldRenderCounter"
v-tooltip
:title="assigneeCounterTooltip" :title="assigneeCounterTooltip"
class="avatar-counter" class="avatar-counter"
> >
...@@ -184,10 +184,10 @@ ...@@ -184,10 +184,10 @@
class="board-card-footer" class="board-card-footer"
> >
<button <button
v-tooltip
v-for="label in issue.labels" v-for="label in issue.labels"
v-if="showLabel(label)" v-if="showLabel(label)"
:key="label.id" :key="label.id"
v-tooltip
:style="labelStyle(label)" :style="labelStyle(label)"
:title="label.description" :title="label.description"
class="badge color-label" class="badge color-label"
......
...@@ -145,8 +145,8 @@ export default { ...@@ -145,8 +145,8 @@ export default {
<icon :name="firstProject.can_push ? 'lock-open' : 'lock'"/> <icon :name="firstProject.can_push ? 'lock-open' : 'lock'"/>
</a> </a>
<a <a
v-tooltip
v-if="isExpandable" v-if="isExpandable"
v-tooltip
:title="restProjectsTooltip" :title="restProjectsTooltip"
class="label deploy-project-label" class="label deploy-project-label"
@click="toggleExpanded" @click="toggleExpanded"
...@@ -154,10 +154,10 @@ export default { ...@@ -154,10 +154,10 @@ export default {
<span>{{ restProjectsLabel }}</span> <span>{{ restProjectsLabel }}</span>
</a> </a>
<a <a
v-tooltip
v-for="deployKeysProject in restProjects" v-for="deployKeysProject in restProjects"
v-else-if="isExpanded" v-else-if="isExpanded"
:key="deployKeysProject.project.full_path" :key="deployKeysProject.project.full_path"
v-tooltip
:href="deployKeysProject.project.full_path" :href="deployKeysProject.project.full_path"
:title="projectTooltipTitle(deployKeysProject)" :title="projectTooltipTitle(deployKeysProject)"
class="label deploy-project-label" class="label deploy-project-label"
...@@ -198,8 +198,8 @@ export default { ...@@ -198,8 +198,8 @@ export default {
{{ __('Enable') }} {{ __('Enable') }}
</action-btn> </action-btn>
<a <a
v-tooltip
v-if="deployKey.can_edit" v-if="deployKey.can_edit"
v-tooltip
:href="editDeployKeyPath" :href="editDeployKeyPath"
:title="__('Edit')" :title="__('Edit')"
class="btn btn-default text-secondary" class="btn btn-default text-secondary"
...@@ -208,8 +208,8 @@ export default { ...@@ -208,8 +208,8 @@ export default {
<icon name="pencil"/> <icon name="pencil"/>
</a> </a>
<action-btn <action-btn
v-tooltip
v-if="isRemovable" v-if="isRemovable"
v-tooltip
:deploy-key="deployKey" :deploy-key="deployKey"
:title="__('Remove')" :title="__('Remove')"
btn-css-class="btn-danger" btn-css-class="btn-danger"
...@@ -219,8 +219,8 @@ export default { ...@@ -219,8 +219,8 @@ export default {
<icon name="remove"/> <icon name="remove"/>
</action-btn> </action-btn>
<action-btn <action-btn
v-tooltip
v-else-if="isEnabled" v-else-if="isEnabled"
v-tooltip
:deploy-key="deployKey" :deploy-key="deployKey"
:title="__('Disable')" :title="__('Disable')"
btn-css-class="btn-warning" btn-css-class="btn-warning"
......
...@@ -181,8 +181,8 @@ export default { ...@@ -181,8 +181,8 @@ export default {
</span> </span>
<strong <strong
v-tooltip
v-else v-else
v-tooltip
:title="filePath" :title="filePath"
class="file-title-name" class="file-title-name"
data-container="body" data-container="body"
...@@ -255,8 +255,8 @@ export default { ...@@ -255,8 +255,8 @@ export default {
</a> </a>
<a <a
v-tooltip
v-if="diffFile.externalUrl" v-if="diffFile.externalUrl"
v-tooltip
:href="diffFile.externalUrl" :href="diffFile.externalUrl"
:title="`View on ${diffFile.formattedExternalUrl}`" :title="`View on ${diffFile.formattedExternalUrl}`"
target="_blank" target="_blank"
......
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
@click.native="toggleDiscussions" @click.native="toggleDiscussions"
/> />
<span <span
v-gl-tooltip
v-if="moreText" v-if="moreText"
v-gl-tooltip
:title="moreText" :title="moreText"
class="diff-comments-more-count js-diff-comment-avatar js-diff-comment-plus" class="diff-comments-more-count js-diff-comment-avatar js-diff-comment-plus"
data-container="body" data-container="body"
......
...@@ -43,18 +43,18 @@ export default { ...@@ -43,18 +43,18 @@ export default {
v-for="(line, index) in diffLines" v-for="(line, index) in diffLines"
> >
<inline-diff-table-row <inline-diff-table-row
:key="line.lineCode"
:file-hash="diffFile.fileHash" :file-hash="diffFile.fileHash"
:context-lines-path="diffFile.contextLinesPath" :context-lines-path="diffFile.contextLinesPath"
:line="line" :line="line"
:is-bottom="index + 1 === diffLinesLength" :is-bottom="index + 1 === diffLinesLength"
:key="line.lineCode"
/> />
<inline-diff-comment-row <inline-diff-comment-row
v-if="shouldRenderInlineCommentRow(line)" v-if="shouldRenderInlineCommentRow(line)"
:key="index"
:diff-file-hash="diffFile.fileHash" :diff-file-hash="diffFile.fileHash"
:line="line" :line="line"
:line-index="index" :line-index="index"
:key="index"
/> />
</template> </template>
</tbody> </tbody>
......
...@@ -45,11 +45,11 @@ export default { ...@@ -45,11 +45,11 @@ export default {
v-for="(line, index) in diffLines" v-for="(line, index) in diffLines"
> >
<parallel-diff-table-row <parallel-diff-table-row
:key="index"
:file-hash="diffFile.fileHash" :file-hash="diffFile.fileHash"
:context-lines-path="diffFile.contextLinesPath" :context-lines-path="diffFile.contextLinesPath"
:line="line" :line="line"
:is-bottom="index + 1 === diffLinesLength" :is-bottom="index + 1 === diffLinesLength"
:key="index"
/> />
<parallel-diff-comment-row <parallel-diff-comment-row
v-if="shouldRenderParallelCommentRow(line)" v-if="shouldRenderParallelCommentRow(line)"
......
...@@ -83,10 +83,10 @@ export default { ...@@ -83,10 +83,10 @@ export default {
:model="model"> :model="model">
<div <div
is="environment-item" is="environment-item"
:key="`environment-item-${i}`"
:model="model" :model="model"
:can-create-deployment="canCreateDeployment" :can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment" :can-read-environment="canReadEnvironment"
:key="`environment-item-${i}`"
/> />
<template <template
...@@ -102,10 +102,10 @@ export default { ...@@ -102,10 +102,10 @@ export default {
<div <div
is="environment-item" is="environment-item"
v-for="(children, index) in model.children" v-for="(children, index) in model.children"
:key="`env-item-${i}-${index}`"
:model="children" :model="children"
:can-create-deployment="canCreateDeployment" :can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment" :can-read-environment="canReadEnvironment"
:key="`env-item-${i}-${index}`"
/> />
<div :key="`sub-div-${i}`"> <div :key="`sub-div-${i}`">
......
...@@ -72,8 +72,8 @@ export default { ...@@ -72,8 +72,8 @@ export default {
@click="onItemActivated(item.text)"> @click="onItemActivated(item.text)">
<span> <span>
<span <span
v-for="(token, index) in item.tokens" v-for="(token, tokenIndex) in item.tokens"
:key="`dropdown-token-${index}`" :key="`dropdown-token-${tokenIndex}`"
class="filtered-search-history-dropdown-token" class="filtered-search-history-dropdown-token"
> >
<span class="name">{{ token.prefix }}</span> <span class="name">{{ token.prefix }}</span>
......
<script> <script>
/* eslint-disable vue/require-default-prop, vue/require-prop-types */ /* eslint-disable vue/require-default-prop */
import Identicon from '../../vue_shared/components/identicon.vue'; import Identicon from '../../vue_shared/components/identicon.vue';
export default { export default {
......
...@@ -46,8 +46,8 @@ export default { ...@@ -46,8 +46,8 @@ export default {
<template> <template>
<div class="controls"> <div class="controls">
<a <a
v-tooltip
v-if="group.canEdit" v-if="group.canEdit"
v-tooltip
:href="group.editPath" :href="group.editPath"
:title="editBtnTitle" :title="editBtnTitle"
:aria-label="editBtnTitle" :aria-label="editBtnTitle"
...@@ -57,8 +57,8 @@ export default { ...@@ -57,8 +57,8 @@ export default {
<icon name="settings"/> <icon name="settings"/>
</a> </a>
<a <a
v-tooltip
v-if="group.canLeave" v-if="group.canLeave"
v-tooltip
:href="group.leavePath" :href="group.leavePath"
:title="leaveBtnTitle" :title="leaveBtnTitle"
:aria-label="leaveBtnTitle" :aria-label="leaveBtnTitle"
......
...@@ -60,8 +60,8 @@ export default { ...@@ -60,8 +60,8 @@ export default {
<div class="position-relative"> <div class="position-relative">
<input <input
ref="searchInput" ref="searchInput"
:placeholder="__('Search branches')"
v-model="search" v-model="search"
:placeholder="__('Search branches')"
type="search" type="search"
class="form-control dropdown-input-field" class="form-control dropdown-input-field"
@input="searchBranches" @input="searchBranches"
......
...@@ -113,8 +113,8 @@ export default { ...@@ -113,8 +113,8 @@ export default {
</strong> </strong>
<div class="d-flex ml-auto"> <div class="d-flex ml-auto">
<button <button
v-tooltip
ref="actionBtn" ref="actionBtn"
v-tooltip
:title="actionBtnText" :title="actionBtnText"
:aria-label="actionBtnText" :aria-label="actionBtnText"
:disabled="!filesLength" :disabled="!filesLength"
...@@ -135,8 +135,8 @@ export default { ...@@ -135,8 +135,8 @@ export default {
/> />
</button> </button>
<button <button
v-tooltip
v-if="!stagedList" v-if="!stagedList"
v-tooltip
:title="__('Discard all changes')" :title="__('Discard all changes')"
:aria-label="__('Discard all changes')" :aria-label="__('Discard all changes')"
:disabled="!filesLength" :disabled="!filesLength"
......
...@@ -174,8 +174,8 @@ export default { ...@@ -174,8 +174,8 @@ export default {
<div class="dropdown-input"> <div class="dropdown-input">
<input <input
ref="searchInput" ref="searchInput"
:placeholder="__('Search files')"
v-model="searchText" v-model="searchText"
:placeholder="__('Search files')"
type="search" type="search"
class="dropdown-input-field" class="dropdown-input-field"
autocomplete="off" autocomplete="off"
......
...@@ -78,10 +78,10 @@ export default { ...@@ -78,10 +78,10 @@ export default {
class="diff-changed-file-name" class="diff-changed-file-name"
> >
<span <span
v-for="(char, index) in file.name.split('')" v-for="(char, charIndex) in file.name.split('')"
:key="index + char" :key="charIndex + char"
:class="{ :class="{
highlighted: nameSearchTextOccurences.indexOf(index) >= 0, highlighted: nameSearchTextOccurences.indexOf(charIndex) >= 0,
}" }"
v-text="char" v-text="char"
> >
...@@ -91,10 +91,10 @@ export default { ...@@ -91,10 +91,10 @@ export default {
class="diff-changed-file-path prepend-top-5" class="diff-changed-file-path prepend-top-5"
> >
<span <span
v-for="(char, index) in pathWithEllipsis.split('')" v-for="(char, charIndex) in pathWithEllipsis.split('')"
:key="index + char" :key="charIndex + char"
:class="{ :class="{
highlighted: pathSearchTextOccurences.indexOf(index) >= 0, highlighted: pathSearchTextOccurences.indexOf(charIndex) >= 0,
}" }"
v-text="char" v-text="char"
> >
......
...@@ -69,8 +69,8 @@ export default { ...@@ -69,8 +69,8 @@ export default {
:size="24" :size="24"
/> />
<strong <strong
v-tooltip="showTooltip"
ref="stageTitle" ref="stageTitle"
v-tooltip="showTooltip"
:title="showTooltip ? stage.name : null" :title="showTooltip ? stage.name : null"
data-container="body" data-container="body"
class="prepend-left-8 ide-stage-title" class="prepend-left-8 ide-stage-title"
......
...@@ -26,8 +26,8 @@ export default { ...@@ -26,8 +26,8 @@ export default {
<template> <template>
<span <span
v-tooltip
v-if="file.file_lock" v-if="file.file_lock"
v-tooltip
:title="lockTooltip" :title="lockTooltip"
data-container="body" data-container="body"
> >
......
...@@ -76,8 +76,8 @@ export default { ...@@ -76,8 +76,8 @@ export default {
> >
</h2> </h2>
<button <button
v-tooltip
v-if="showInlineEditButton && canUpdate" v-if="showInlineEditButton && canUpdate"
v-tooltip
type="button" type="button"
class="btn btn-default btn-edit btn-svg js-issuable-edit" class="btn btn-default btn-edit btn-svg js-issuable-edit"
title="Edit title and description" title="Edit title and description"
......
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
<div class="controllers float-right"> <div class="controllers float-right">
<!-- links --> <!-- links -->
<a <a
v-tooltip
v-if="rawTracePath" v-if="rawTracePath"
v-tooltip
:title="s__('Job|Show complete raw')" :title="s__('Job|Show complete raw')"
:href="rawTracePath" :href="rawTracePath"
class="js-raw-link-controller controllers-buttons" class="js-raw-link-controller controllers-buttons"
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
</a> </a>
<button <button
v-tooltip
v-if="canEraseJob" v-if="canEraseJob"
v-tooltip
:title="s__('Job|Erase job log')" :title="s__('Job|Erase job log')"
type="button" type="button"
class="js-erase-link controllers-buttons" class="js-erase-link controllers-buttons"
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
class="build-job" class="build-job"
> >
<a <a
v-tooltip
v-for="job in jobs" v-for="job in jobs"
:key="job.id" :key="job.id"
v-tooltip
:href="job.path" :href="job.path"
:title="job.tooltip" :title="job.tooltip"
:class="{ active: job.active, retried: job.retried }" :class="{ active: job.active, retried: job.retried }"
......
...@@ -214,8 +214,8 @@ export default { ...@@ -214,8 +214,8 @@ export default {
:show-panels="showPanels" :show-panels="showPanels"
> >
<graph <graph
v-for="(graphData, index) in groupData.metrics" v-for="(graphData, graphIndex) in groupData.metrics"
:key="index" :key="graphIndex"
:graph-data="graphData" :graph-data="graphData"
:hover-data="hoverData" :hover-data="hoverData"
:update-aspect-ratio="updateAspectRatio" :update-aspect-ratio="updateAspectRatio"
......
...@@ -58,8 +58,8 @@ export default { ...@@ -58,8 +58,8 @@ export default {
</td> </td>
<template v-for="(track, trackIndex) in series.tracksLegend"> <template v-for="(track, trackIndex) in series.tracksLegend">
<track-line <track-line
:track="track" :key="`track-line-${trackIndex}`"
:key="`track-line-${trackIndex}`"/> :track="track"/>
<td :key="`track-info-${trackIndex}`"> <td :key="`track-info-${trackIndex}`">
<track-info <track-info
:track="track" :track="track"
......
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
<template> <template>
<div v-if="hasNotebook"> <div v-if="hasNotebook">
<component <component
v-for="(cell, index) in cells"
:is="cellType(cell.cell_type)" :is="cellType(cell.cell_type)"
:cell="cell" v-for="(cell, index) in cells"
:key="index" :key="index"
:cell="cell"
:code-css-class="codeCssClass" /> :code-css-class="codeCssClass" />
</div> </div>
</template> </template>
......
...@@ -41,8 +41,8 @@ export default { ...@@ -41,8 +41,8 @@ export default {
</div> </div>
<template v-else> <template v-else>
<component <component
ref="titleWrapper"
:is="titleTag" :is="titleTag"
ref="titleWrapper"
:href="diffFile.discussionPath" :href="diffFile.discussionPath"
> >
<span v-html="diffFile.blobIcon"></span> <span v-html="diffFile.blobIcon"></span>
......
...@@ -182,9 +182,9 @@ export default { ...@@ -182,9 +182,9 @@ export default {
<div class="note-awards"> <div class="note-awards">
<div class="awards js-awards-block"> <div class="awards js-awards-block">
<button <button
v-tooltip
v-for="(awardList, awardName, index) in groupedAwards" v-for="(awardList, awardName, index) in groupedAwards"
:key="index" :key="index"
v-tooltip
:class="getAwardClassBindings(awardList)" :class="getAwardClassBindings(awardList)"
:title="awardTitle(awardList)" :title="awardTitle(awardList)"
class="btn award-control" class="btn award-control"
......
...@@ -171,8 +171,8 @@ export default { ...@@ -171,8 +171,8 @@ export default {
id="note_note" id="note_note"
ref="textarea" ref="textarea"
slot="textarea" slot="textarea"
:data-supports-quick-actions="!isEditing"
v-model="updatedNoteBody" v-model="updatedNoteBody"