Add eslint to prevent wrapper.vm.setData
What does this MR do and why?
Add eslint to prevent wrapper.vm.setData
- for best VTU practices
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.
Before | 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/spec/frontend/security_orchestration/components/policies/list_component_spec.js b/ee/spec/frontend/security_orchestration/components/policies/list_component_spec.js
index 256abb45bbb3..927414e6e4c7 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
@@ -376,6 +376,7 @@ describe('List component', () => {
});
it('displays inherited scan execution policies', () => {
+ wrapper.vm.setData();
expect(trimText(findPolicyTypeCells().at(0).text())).toBe(
POLICY_TYPE_FILTER_OPTIONS.SCAN_EXECUTION.text,
);
- Run
node scripts/frontend/eslint.js ee/app/assets/javascripts/security_orchestration/components/policies/list_component.vue
- Verify errors appear
Edited by Alexander Turinske