feat: add vue-no-undef-components rule
This MR adds the @gitlab/vue-no-undef-components
rule, which under the hood uses vue/no-undef-components
but extends it with path-specific ignores. It also changes the messaging a bit.
The reason for this is that the bugs in gitlab-org/gitlab!148425 (merged) (~4 weeks to being fixed) and gitlab-org/gitlab!154930 (merged) (~3 years??) could’ve been avoided by this rule.
Closes gitlab-org/gitlab#464700 (closed)
How to test locally
- Checkout gitlab-org/gitlab!154931 (closed)
- Run
yarn lint:eslint:all
- See that there are no errors
- In any component, add an undefined component to the template
- Run
yarn lint:eslint:all
(or use your IDE’s built-in eslint) - See that the component reports an error
There might still be an error in ee/app/assets/javascripts/operations/components/dashboard/project.vue
. It should be resolved once gitlab-org/gitlab!154930 (merged) is merged.
Edited by Kev Kloss