From e492fb55fc6f5c47cb464a8c518b6953c84bb428 Mon Sep 17 00:00:00 2001
From: Coung Ngo <cngo@gitlab.com>
Date: Mon, 10 Mar 2025 13:21:27 +0000
Subject: [PATCH] Remove Vue unused properties

Remove them from ~/issuable and ~/issues
---
 .eslint_todo/vue-no-unused-properties.mjs         | 15 ---------------
 .../components/csv_import_export_buttons.vue      |  5 -----
 .../popover/components/comment_popover.vue        |  4 ----
 .../components/empty_state_without_any_issues.vue |  6 ------
 .../list/components/issue_card_time_info.vue      |  5 -----
 .../components/jira_issues_import_status_app.vue  |  8 --------
 app/assets/javascripts/issues/list/index.js       |  2 --
 .../javascripts/issues/show/components/app.vue    |  8 --------
 .../issues/show/components/description.vue        |  5 -----
 .../issues/show/components/edit_actions.vue       | 11 +----------
 .../issues/show/components/fields/description.vue |  5 -----
 .../issues/show/components/fields/type.vue        |  2 +-
 .../javascripts/issues/show/components/form.vue   | 12 +-----------
 .../issues/show/components/header_actions.vue     |  5 -----
 .../incidents/create_timeline_event.vue           |  3 ---
 .../components/incidents/timeline_events_form.vue |  2 +-
 .../components/incidents/timeline_events_list.vue |  5 -----
 .../components/incidents/timeline_events_tab.vue  |  1 -
 .../show/components/sentry_error_stack_trace.vue  |  2 +-
 .../javascripts/issues/show/components/title.vue  |  5 -----
 .../list/components/issues_list_app_spec.js       |  1 -
 .../list/components/work_items_list_app_spec.js   |  1 -
 22 files changed, 5 insertions(+), 108 deletions(-)

diff --git a/.eslint_todo/vue-no-unused-properties.mjs b/.eslint_todo/vue-no-unused-properties.mjs
index f93163ced0353..48b6d32b0b22e 100644
--- a/.eslint_todo/vue-no-unused-properties.mjs
+++ b/.eslint_todo/vue-no-unused-properties.mjs
@@ -159,21 +159,6 @@ export default {
     'app/assets/javascripts/invite_members/components/invite_group_notification.vue',
     'app/assets/javascripts/invite_members/components/project_select.vue',
     'app/assets/javascripts/invite_members/components/user_limit_notification.vue',
-    'app/assets/javascripts/issuable/components/csv_import_export_buttons.vue',
-    'app/assets/javascripts/issuable/popover/components/comment_popover.vue',
-    'app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue',
-    'app/assets/javascripts/issues/list/components/issue_card_time_info.vue',
-    'app/assets/javascripts/issues/list/components/jira_issues_import_status_app.vue',
-    'app/assets/javascripts/issues/show/components/description.vue',
-    'app/assets/javascripts/issues/show/components/edit_actions.vue',
-    'app/assets/javascripts/issues/show/components/fields/description.vue',
-    'app/assets/javascripts/issues/show/components/fields/type.vue',
-    'app/assets/javascripts/issues/show/components/header_actions.vue',
-    'app/assets/javascripts/issues/show/components/incidents/create_timeline_event.vue',
-    'app/assets/javascripts/issues/show/components/incidents/timeline_events_form.vue',
-    'app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue',
-    'app/assets/javascripts/issues/show/components/sentry_error_stack_trace.vue',
-    'app/assets/javascripts/issues/show/components/title.vue',
     'app/assets/javascripts/jira_connect/branches/components/new_branch_form.vue',
     'app/assets/javascripts/jira_import/components/jira_import_form.vue',
     'app/assets/javascripts/kubernetes_dashboard/components/workload_details.vue',
diff --git a/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue b/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue
index 415653f7a8f97..57f8ba418a0a4 100644
--- a/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue
+++ b/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue
@@ -42,11 +42,6 @@ export default {
       required: false,
       default: undefined,
     },
-    trackImportClick: {
-      type: Boolean,
-      required: false,
-      default: null,
-    },
   },
   data() {
     return {
diff --git a/app/assets/javascripts/issuable/popover/components/comment_popover.vue b/app/assets/javascripts/issuable/popover/components/comment_popover.vue
index abb90125ace18..788c68d1661e5 100644
--- a/app/assets/javascripts/issuable/popover/components/comment_popover.vue
+++ b/app/assets/javascripts/issuable/popover/components/comment_popover.vue
@@ -5,7 +5,6 @@ import { TYPENAME_NOTE } from '~/graphql_shared/constants';
 import SafeHtml from '~/vue_shared/directives/safe_html';
 import timeagoMixin from '~/vue_shared/mixins/timeago';
 import noteQuery from '../queries/note.query.graphql';
-import { renderGFM } from '../../../behaviors/markdown/render_gfm';
 
 export default {
   safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
@@ -86,9 +85,6 @@ export default {
     },
   },
   methods: {
-    renderGFM() {
-      renderGFM(this.$refs.gfm);
-    },
     fallback() {
       this.show = false;
     },
diff --git a/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue b/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue
index 115a92ffa6fe6..9b70a7fd78153 100644
--- a/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue
+++ b/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue
@@ -57,11 +57,6 @@ export default {
       required: false,
       default: false,
     },
-    showIssuableByEmail: {
-      type: Boolean,
-      required: false,
-      default: false,
-    },
   },
   computed: {
     createProjectMessage() {
@@ -142,7 +137,6 @@ export default {
             <csv-import-export-buttons
               :export-csv-path="exportCsvPathWithQuery"
               :issuable-count="currentTabCount"
-              track-import-click
             />
           </gl-disclosure-dropdown>
         </template>
diff --git a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue
index 12beeebd08098..67f72d199779a 100644
--- a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue
+++ b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue
@@ -19,11 +19,6 @@ export default {
       type: Object,
       required: true,
     },
-    isWorkItemList: {
-      type: Boolean,
-      required: false,
-      default: false,
-    },
   },
   computed: {
     milestone() {
diff --git a/app/assets/javascripts/issues/list/components/jira_issues_import_status_app.vue b/app/assets/javascripts/issues/list/components/jira_issues_import_status_app.vue
index 43e09b2420f91..50345c2855ff9 100644
--- a/app/assets/javascripts/issues/list/components/jira_issues_import_status_app.vue
+++ b/app/assets/javascripts/issues/list/components/jira_issues_import_status_app.vue
@@ -17,14 +17,6 @@ export default {
     GlLabel,
   },
   props: {
-    canEdit: {
-      type: Boolean,
-      required: true,
-    },
-    isJiraConfigured: {
-      type: Boolean,
-      required: true,
-    },
     issuesPath: {
       type: String,
       required: true,
diff --git a/app/assets/javascripts/issues/list/index.js b/app/assets/javascripts/issues/list/index.js
index 9063ad2dba47d..a63750c6725c4 100644
--- a/app/assets/javascripts/issues/list/index.js
+++ b/app/assets/javascripts/issues/list/index.js
@@ -46,8 +46,6 @@ export async function mountJiraIssuesListApp() {
     render(createComponent) {
       return createComponent(JiraIssuesImportStatusApp, {
         props: {
-          canEdit,
-          isJiraConfigured,
           issuesPath,
           projectPath,
         },
diff --git a/app/assets/javascripts/issues/show/components/app.vue b/app/assets/javascripts/issues/show/components/app.vue
index 7b19cf41b5008..7871be7c85ecd 100644
--- a/app/assets/javascripts/issues/show/components/app.vue
+++ b/app/assets/javascripts/issues/show/components/app.vue
@@ -173,11 +173,6 @@ export default {
       required: false,
       default: TYPE_ISSUE,
     },
-    canAttachFile: {
-      type: Boolean,
-      required: false,
-      default: true,
-    },
     lockVersion: {
       type: Number,
       required: false,
@@ -539,7 +534,6 @@ export default {
     <div v-if="canUpdate && showForm">
       <h1 class="gl-sr-only">{{ __('Edit issue') }}</h1>
       <form-component
-        :endpoint="endpoint"
         :form-state="formState"
         :initial-description-text="initialDescriptionText"
         :issuable-templates="formState.issuableTemplates"
@@ -548,7 +542,6 @@ export default {
         :project-path="projectPath"
         :project-id="projectId"
         :project-namespace="projectNamespace"
-        :can-attach-file="canAttachFile"
         :enable-autocomplete="enableAutocomplete"
         :issuable-type="issuableType"
         @updateForm="setFormState"
@@ -558,7 +551,6 @@ export default {
       <title-component
         ref="title"
         :issuable-ref="issuableRef"
-        :can-update="canUpdate"
         :title-html="state.titleHtml"
         :title-text="state.titleText"
       >
diff --git a/app/assets/javascripts/issues/show/components/description.vue b/app/assets/javascripts/issues/show/components/description.vue
index e98a65605d94d..2f65380026508 100644
--- a/app/assets/javascripts/issues/show/components/description.vue
+++ b/app/assets/javascripts/issues/show/components/description.vue
@@ -75,11 +75,6 @@ export default {
       required: false,
       default: null,
     },
-    issueIid: {
-      type: String,
-      required: false,
-      default: null,
-    },
     isUpdating: {
       type: Boolean,
       required: false,
diff --git a/app/assets/javascripts/issues/show/components/edit_actions.vue b/app/assets/javascripts/issues/show/components/edit_actions.vue
index 50296d0820f52..b99dfefdee149 100644
--- a/app/assets/javascripts/issues/show/components/edit_actions.vue
+++ b/app/assets/javascripts/issues/show/components/edit_actions.vue
@@ -13,24 +13,15 @@ export default {
   },
   mixins: [trackingMixin, updateMixin],
   props: {
-    endpoint: {
-      required: true,
-      type: String,
-    },
     formState: {
       type: Object,
       required: true,
     },
-    issuableType: {
-      type: String,
-      required: true,
-    },
   },
   data() {
     return {
-      deleteLoading: false,
       skipApollo: false,
-      issueState: {},
+      issueState: {}, // eslint-disable-line vue/no-unused-properties
     };
   },
   apollo: {
diff --git a/app/assets/javascripts/issues/show/components/fields/description.vue b/app/assets/javascripts/issues/show/components/fields/description.vue
index 1f159e71da9a7..3dea9626fe55c 100644
--- a/app/assets/javascripts/issues/show/components/fields/description.vue
+++ b/app/assets/javascripts/issues/show/components/fields/description.vue
@@ -24,11 +24,6 @@ export default {
       type: String,
       required: true,
     },
-    canAttachFile: {
-      type: Boolean,
-      required: false,
-      default: true,
-    },
     enableAutocomplete: {
       type: Boolean,
       required: false,
diff --git a/app/assets/javascripts/issues/show/components/fields/type.vue b/app/assets/javascripts/issues/show/components/fields/type.vue
index 4ab49e5df38bc..1108f0b1b9bff 100644
--- a/app/assets/javascripts/issues/show/components/fields/type.vue
+++ b/app/assets/javascripts/issues/show/components/fields/type.vue
@@ -29,7 +29,7 @@ export default {
   },
   data() {
     return {
-      issueState: {},
+      issueState: {}, // eslint-disable-line vue/no-unused-properties
       selectedIssueType: '',
     };
   },
diff --git a/app/assets/javascripts/issues/show/components/form.vue b/app/assets/javascripts/issues/show/components/form.vue
index 8b6f4b18d68e0..cc69d8d3bac98 100644
--- a/app/assets/javascripts/issues/show/components/form.vue
+++ b/app/assets/javascripts/issues/show/components/form.vue
@@ -22,10 +22,6 @@ export default {
     LockedWarning,
   },
   props: {
-    endpoint: {
-      type: String,
-      required: true,
-    },
     formState: {
       type: Object,
       required: true,
@@ -59,11 +55,6 @@ export default {
       type: String,
       required: true,
     },
-    canAttachFile: {
-      type: Boolean,
-      required: false,
-      default: true,
-    },
     enableAutocomplete: {
       type: Boolean,
       required: false,
@@ -207,11 +198,10 @@ export default {
       v-model="formData.description"
       :markdown-preview-path="markdownPreviewPath"
       :markdown-docs-path="markdownDocsPath"
-      :can-attach-file="canAttachFile"
       :enable-autocomplete="enableAutocomplete"
       @input="updateDescriptionDraft"
     />
 
-    <edit-actions :endpoint="endpoint" :form-state="formState" :issuable-type="issuableType" />
+    <edit-actions :form-state="formState" />
   </form>
 </template>
diff --git a/app/assets/javascripts/issues/show/components/header_actions.vue b/app/assets/javascripts/issues/show/components/header_actions.vue
index 5da717b8576c3..7d2b49c38561d 100644
--- a/app/assets/javascripts/issues/show/components/header_actions.vue
+++ b/app/assets/javascripts/issues/show/components/header_actions.vue
@@ -126,10 +126,6 @@ export default {
   computed: {
     ...mapState(['isToggleStateButtonLoading']),
     ...mapGetters(['openState', 'getBlockedByIssues']),
-    ...mapGetters(['getNoteableData']),
-    isLocked() {
-      return this.getNoteableData.discussion_locked;
-    },
     isClosed() {
       return this.openState === STATUS_CLOSED;
     },
@@ -230,7 +226,6 @@ export default {
   },
   methods: {
     ...mapActions(['toggleStateButtonLoading']),
-    ...mapActions(['updateLockedAttribute']),
     toggleIssueState() {
       if (!this.isClosed && this.getBlockedByIssues?.length) {
         this.$refs.blockedByIssuesModal.show();
diff --git a/app/assets/javascripts/issues/show/components/incidents/create_timeline_event.vue b/app/assets/javascripts/issues/show/components/incidents/create_timeline_event.vue
index 71337a64ac5e4..8d7968881f17a 100644
--- a/app/assets/javascripts/issues/show/components/incidents/create_timeline_event.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/create_timeline_event.vue
@@ -30,9 +30,6 @@ export default {
     return { createTimelineEventActive: false };
   },
   methods: {
-    clearForm() {
-      this.$refs.eventForm.clear();
-    },
     updateCache(store, { data }) {
       const { timelineEvent: event, errors } = data?.timelineEventCreate || {};
 
diff --git a/app/assets/javascripts/issues/show/components/incidents/timeline_events_form.vue b/app/assets/javascripts/issues/show/components/incidents/timeline_events_form.vue
index 15c0a55ff7f1d..cbb4ed7f769b0 100644
--- a/app/assets/javascripts/issues/show/components/incidents/timeline_events_form.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/timeline_events_form.vue
@@ -83,7 +83,6 @@ export default {
     return {
       timelineText: this.previousNote,
       timelineTextIsDirty: this.isEditing,
-      placeholderDate,
       hourPickerInput: placeholderDate.getHours(),
       minutePickerInput: placeholderDate.getMinutes(),
       datePickerInput: placeholderDate,
@@ -130,6 +129,7 @@ export default {
     this.focusDate();
   },
   methods: {
+    // eslint-disable-next-line vue/no-unused-properties
     clear() {
       const newPlaceholderDate = getUtcShiftedDate();
       this.datePickerInput = newPlaceholderDate;
diff --git a/app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue b/app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue
index d70d94e0ae8ad..058e41e93ece4 100644
--- a/app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/timeline_events_list.vue
@@ -18,11 +18,6 @@ export default {
     EditTimelineEvent,
   },
   props: {
-    timelineEventLoading: {
-      type: Boolean,
-      required: false,
-      default: true,
-    },
     timelineEvents: {
       type: Array,
       required: true,
diff --git a/app/assets/javascripts/issues/show/components/incidents/timeline_events_tab.vue b/app/assets/javascripts/issues/show/components/incidents/timeline_events_tab.vue
index 0246f8cb1f470..9e1c293cd5403 100644
--- a/app/assets/javascripts/issues/show/components/incidents/timeline_events_tab.vue
+++ b/app/assets/javascripts/issues/show/components/incidents/timeline_events_tab.vue
@@ -82,7 +82,6 @@ export default {
     </div>
     <incident-timeline-events-list
       v-if="hasTimelineEvents"
-      :timeline-event-loading="timelineEventLoading"
       :timeline-events="timelineEvents"
       @hide-new-timeline-events-form="hideEventForm"
     />
diff --git a/app/assets/javascripts/issues/show/components/sentry_error_stack_trace.vue b/app/assets/javascripts/issues/show/components/sentry_error_stack_trace.vue
index 08cda8c3cdcb1..2139f69a08f4b 100644
--- a/app/assets/javascripts/issues/show/components/sentry_error_stack_trace.vue
+++ b/app/assets/javascripts/issues/show/components/sentry_error_stack_trace.vue
@@ -17,7 +17,7 @@ export default {
     },
   },
   computed: {
-    ...mapState('details', ['loadingStacktrace', 'stacktraceData']),
+    ...mapState('details', ['loadingStacktrace']),
     ...mapGetters('details', ['stacktrace']),
   },
   mounted() {
diff --git a/app/assets/javascripts/issues/show/components/title.vue b/app/assets/javascripts/issues/show/components/title.vue
index e0cde8a6b0b5d..05081c1d982b7 100644
--- a/app/assets/javascripts/issues/show/components/title.vue
+++ b/app/assets/javascripts/issues/show/components/title.vue
@@ -15,11 +15,6 @@ export default {
       type: [String, Number],
       required: true,
     },
-    canUpdate: {
-      required: false,
-      type: Boolean,
-      default: false,
-    },
     titleHtml: {
       type: String,
       required: true,
diff --git a/spec/frontend/issues/list/components/issues_list_app_spec.js b/spec/frontend/issues/list/components/issues_list_app_spec.js
index 76bc365f60048..7ff80db51eaf0 100644
--- a/spec/frontend/issues/list/components/issues_list_app_spec.js
+++ b/spec/frontend/issues/list/components/issues_list_app_spec.js
@@ -610,7 +610,6 @@ describe('CE IssuesListApp component', () => {
             currentTabCount: 0,
             exportCsvPathWithQuery: defaultProvide.exportCsvPath,
             showCsvButtons: true,
-            showIssuableByEmail: false,
             showNewIssueDropdown: false,
           });
         });
diff --git a/spec/frontend/work_items/list/components/work_items_list_app_spec.js b/spec/frontend/work_items/list/components/work_items_list_app_spec.js
index 9fe0e90908d46..0f8f09f31cbfb 100644
--- a/spec/frontend/work_items/list/components/work_items_list_app_spec.js
+++ b/spec/frontend/work_items/list/components/work_items_list_app_spec.js
@@ -169,7 +169,6 @@ describeSkipVue3(skipReason, () => {
 
     it('renders IssueCardTimeInfo component', () => {
       expect(findIssueCardTimeInfo().exists()).toBe(true);
-      expect(findIssueCardTimeInfo().props('isWorkItemList')).toBe(true);
     });
 
     it('renders IssueHealthStatus component', () => {
-- 
GitLab