[go: up one dir, main page]

Address vue/no-unused-properties violations in app/assets/javascripts/vue_merge_request_widget/

**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

  1. 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.
  1. mr_widget_merge_enabled.vue
  • No unused props or methods found.
  • Test file (mr_widget_auto_enabled_spec.js) uses propsData effectively.
  1. 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.
  1. mr_widget_checking.vue
  • Removed unused prop: mr.
  • Cleaned up test (mr_widget_checking_spec.js) by removing redundant propsData.
  1. 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.
  1. mr_widget_missing_branch.vue
  • No unused props or methods.
  • propsData verified in mr_widget_missing_branch_spec.js.

Test Results

  • All relevant states/* specs pass locally.
  • Non-related test failure observed (getJobArtifactsResponse fixture missing) — unrelated to this MR scope.

Next Steps Moving on to clean up other components in this directory.

Please let me know if anything was missed — happy to review or revise accordingly. Thanks!

Re #525778 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading