Address vue/no-unused-properties violations in app/assets/javascripts/vue_merge_request_widget/
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
**I have grouped the files into sections, each with its own MR. The first section states/*. **
Scope: states/* Components This MR focuses on cleaning up unused props and methods as flagged by the vue/no-unused-properties ESLint rule, specifically under the vue_merge_request_widget/states/ directory. Each file was individually reviewed and updated where applicable.
Summary of Changes
- mr_widget_merge_archived.vue
- Retained name: MRWidgetArchived for global registration/use.
- Removed unused prop: mr.
- Cleaned up propsData in mr_widget_archived_spec.js.
- mr_widget_merge_enabled.vue
- No unused props or methods found.
- Test file (mr_widget_auto_enabled_spec.js) uses propsData effectively.
- mr_widget_auto_merge_failed.vue
- Prop mr not directly used in component or methods.
- However, it's referenced in test setup — left untouched to avoid breaking implicit usage.
- mr_widget_checking.vue
- Removed unused prop: mr.
- Cleaned up test (mr_widget_checking_spec.js) by removing redundant propsData.
- mr_widget_merged.vue
- All props and methods are actively used.
- propsData confirmed in tests (mr_widget_merged_spec.js).
- Component imported in show.rb — no changes made.
- mr_widget_missing_branch.vue
- No unused props or methods.
- propsData verified in mr_widget_missing_branch_spec.js.
- All relevant states/* specs pass locally.
- Non-related test failure observed (getJobArtifactsResponse fixture missing) — unrelated to this MR scope.
Please let me know if anything was missed — happy to review or revise accordingly. Thanks!
Edited by Paul Gascou-Vaillancourt