• Mark Florian's avatar
    Fix/ignore no-runtime-template-compiler violations · 3fac0ad8
    Mark Florian authored
    The existing violations of the @gitlab/no-runtime-template-compiler rule
    fall into a few different categories:
    
    - True violations
      - Explicit `template` options in Vue component definitions
      - Implicit violations by relying on the mounting element to contain
        the template, generated by the backend
    - False violations
      - Instantiating a Vue SFC by spreading it into `new Vue`, e.g.:
        `new Vue({ el, ...SomeVueSFC });`
      - EE components which use `extends` of a CE component, which itself
        correctly uses an ahead-of-time compiled template
      - Pretty much any file that defines a global Vue mixin
    
    The more straight-forward true violations have been fixed and verified
    as working, although there doesn't seem to be existing unit tests for
    them.
    
    The aren't many examples of false violations in the codebase, though
    it's feasible that the lint rule could be improved to not report these
    in future.
    
    The rule is disabled entirely for specs, since in that context, having
    a runtime template compiler can be useful.
    
    Addresses https://gitlab.com/gitlab-org/frontend/eslint-plugin/-/issues/24,
    part of https://gitlab.com/groups/gitlab-org/-/epics/5142.
    3fac0ad8
parallel_conflict_lines.js 1.51 KB