Skip to content

Add linting for Vue 2 delete api for specs

Alexander Turinske requested to merge update-esling-for-vue-2-delete into master

What does this MR do and why?

Add linting for Vue 2 delete api for specs

  • mirror changes for non-spec files
  • handle nested call of $delete from wrapper.vm.$delete()

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

After
image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Apply the following patch
diff --git a/ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js b/ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js
index 154246482453..9de54bfba728 100644
--- a/ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js
+++ b/ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js
@@ -412,6 +412,10 @@ describe('List component', () => {
       });
 
       it('displays inherited scan execution policies', () => {
+        this.$delete();
+        wrapper.vm.$delete();
+        Vue.delete();
+        unwrappedVm.$delete();
         expect(trimText(findPolicyTypeCells().at(0).text())).toBe(
           POLICY_TYPE_FILTER_OPTIONS.SCAN_EXECUTION.text,
         );
  1. Run node scripts/frontend/eslint.js ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js
  2. Verify errors appear
Edited by Alexander Turinske

Merge request reports

Loading