Add eslint rule preventing delete method for Vue 3
What does this MR do and why?
Add eslint rule preventing delete method for Vue 3
- prevent delete method from
this
,vm
, andVue
- from the Vue 3 migration docs,
Global functions set and delete, and the instance methods $set and $delete. They are no longer required with proxy-based change detection.
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 |
---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Apply the following patch
diff --git a/ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue b/ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue
index 26c1b7876b59..0aa7930c0ddf 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue
+++ b/ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue
@@ -211,6 +211,9 @@ export default {
if (this.shouldUpdatePolicyList) {
this.$emit('cleared-selected');
+ this.$delete();
+ vm.$delete();
+ Vue.delete();
}
},
convertFilterValue(defaultValue, value) {
- Run
node scripts/frontend/eslint.js ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue
- Verify errors appear
Edited by Alexander Turinske