1. 08 Jan, 2021 1 commit
    • Mark Florian's avatar
      Update to @gitlab/eslint-plugin@6 · f7c724e8
      Mark Florian authored
      This updates to `@gitlab/eslint-plugin@6`, which includes breaking
      changes via the transitive dependency `eslint-plugin-vue` being upgraded
      from v6 to v7.
      
      This adds/improves various lint rules of Vue files; the full changes are
      documented in their [release post][1]. The most notable addition is the
      `vue/no-mutating-props` rule, which can help to prevent subtle runtime
      bugs.
      
      For several of the new/changed rules, the GitLab codebase has a number
      of violations. Rather than fixing all of them in this change, those new
      rules are disabled (e.g., `vue/no-mutating-props`), and the changed
      rules are reconfigured to mimic v6 settings (e.g.,
      `vue/order-in-components`).  This way, these can be addressed/fixed
      separately in follow ups.
      
      Otherwise, one-off violations, (e.g., of `vue/require-render-return`)
      have been fixed here.
      
      There were a few odd findings during this process that might suggest
      upstream bugs:
      
      1. The `vue/one-component-per-file` rule finds what seems to be only
         false positives in this codebase, e.g.,
         `~/registry/explorer/components/list_page/cli_commands.vue`; it
         _seems_ like the `Tracking.mixin` call is being considered as another
         component definition(?).
      2. Three rules were violated by the line
         `spec/frontend/clusters/components/applications_spec.js:547`:
         `@gitlab/vue-require-required-key`, `vue/require-default-prop` and
         `vue/require-prop-type-constructor.` This is odd, because no Vue
         component was being defined or constructed there. Changing a `props`
         field to `propsData` resolved all three.
      
      Addresses https://gitlab.com/gitlab-org/gitlab/-/issues/296868, part of
      https://gitlab.com/groups/gitlab-org/-/epics/5142.
      
      [1]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.0.0
      f7c724e8
  2. 07 Jan, 2021 39 commits