Skip to content
Snippets Groups Projects
  1. Sep 17, 2020
  2. Sep 15, 2020
  3. Sep 01, 2020
  4. Aug 26, 2020
  5. Aug 24, 2020
    • Lukas Eipert's avatar
      Utilize GitLab UI icon component: ee/ · a4901248
      Lukas Eipert authored
      This replaces all the usages of ~/vue_shared/components/icon.vue with
      the corresponding GitLab UI component for all remaining ee/ components.
      
      In a previous MR [0] we already replaced the internal implementation
      with the GitLab UI component. This should allow us to migrate all usages
      without any test failures relating to the differences in their
      implementation.
      
      The actual deletion of the file will be done in a follow-up in case we
      have missed an instance or someone introduces a new one in the
      meanwhile.
      
      [0]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38778
      Unverified
      a4901248
  6. Aug 20, 2020
    • markrian's avatar
      Disable default export rules · 600155b6
      markrian authored
      This is part of the work to implement the consensus reached in the
      [RFC][1] to prefer named exports over defalt exports.
      
      Future iterations will migrate existing default exports to named
      exports.
      
      The bulk of the changes in this commit were performed with the following
      script:
      
      ```bash
      set -u
      
      changed-files()
      {
          local trunk="origin/master"
          local file=
          local committed_files=$(git diff "$trunk"... --numstat \
              | awk '/\.(js|vue)$/{ print $3 }')
          local changed_files=$(git diff --numstat \
              | awk '/\.(js|vue)$/{ print $3 }')
          for file in ${committed_files[@]} ${changed_files[@]}; do
              if [ -f "$file" ]; then
                  echo "$file"
              fi
          done
      }
      
      git grep -lz "import/prefer-default-export" -- '**/*.js' \
          | xargs -0 perl -0pi -e \
          "s/[^\n]*eslint-disable[^\n]*"\
      "import\/prefer-default-export[^\n]*\n//mgs"
      
      git grep -lz "rfcs/-/issues/20" -- '**/*.js' \
          | xargs -0 perl -0pi -e \
          "s/[^\n]*rfcs\/-\/issues\/20[^\n]*\n//mgs"
      
      yarn prettier --write $(changed-files)
      ```
      
      The script is [idempotent][2], to help make it easier to keep
      up-to-date.
      
      [1]: https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20
      [2]: https://en.wikipedia.org/wiki/Idempotence
      Unverified
      600155b6
    • E'zeki&el Kigbo's avatar
      Swap create flash functions · c8aa5692
      E'zeki&el Kigbo authored
      Replaces the default export flash
      function with the newCreateFlash.
      
      Fix outstanding flash imports
      
      Updates specs and replaces outstanding
      imports for `Flash`
      
      Fixes additional specs
      
      Updates the remaining calls to different
      flash methods, except for the window.Flash
      method since this will break .erb templates
      Unverified
      c8aa5692
  7. Jul 24, 2020
    • Mike Greiling's avatar
      Rename GlDropdown to GlDeprecatedDropdown · c39f47af
      Mike Greiling authored
      The GlDropdown component has been deprecated in favor of
      GlNewDropdown. During this transition GlDropdown has been
      renamed to GlDeprecatedDropdown. This rename effects
      GlDropdownItem, GlDropdownHeader, and GlDropdownDivider
      as well.
      Unverified
      c39f47af
  8. Jul 17, 2020
    • markrian's avatar
      Remove no-op default exports · 78947ddd
      markrian authored
      These no-op default exports have served one or both of these purposes:
      
      1. Preventing `babel-plugin-rewire` from generating an invalid default
         during karma tests;
      1. Working around the `import/prefer-default-export` ESLint rule for
         files which only have one named export.
      
      As we recently finished migrating all relevant specs from Karma to Jest,
      the first purpose is no longer necessary (with two exceptions, see
      below).
      
      The second purpose will become unnecessary once the [RFC][1] to prefer
      named exports to default exports is implemented.
      
      As such, this commit removes almost all no-op default exports, and adds
      explicit `eslint-disable-next-line` directives (which can be removed
      once the RFC is implemented).
      
      ---
      
      This work was achieved in a few steps. First, the default exports
      explicitly marked as `babel-plugin-rewire` workarounds were removed.
      
      This was achieved via this command:
      
          rg --color=never -l0 "// prevent babel-plugin-rewire" \
              | xargs -0 \
              perl -0pi -e \
              's/\n+\/\/ prevent babel-plugin-rewire[^\n]*tests'\
          '(?:\nexport default \(\) => {};)?//mgs'
      
      The documentation describing this workaround was then removed by hand.
      
      Unfortunately, two files still participate in Karma tests, and still
      need this workaround, so these were reverted manually. Those files (at
      the time of writing) are:
      
          app/assets/javascripts/monitoring/stores/actions.js
          app/assets/javascripts/monitoring/stores/getters.js
      
      Then, all additional no-op default exports were removed with this
      command:
      
          rg --color=never -l0 -F "export default () => {};" \
              | xargs -0 perl -0pi -e 's/\n+export default \(\) => {};//mgs'
      
      Since the `import/prefer-default-export` ESLint rule is still in place,
      the files violating it have to disable it explicitly.
      
      With the [RFC][1] to prefer named exports to default exports receiving
      wide approval, it makes sense to mark these current violations
      _explicitly_ with `eslint-disable-next-line` directives, rather than
      _implicitly_ via the no-op default export hack.
      
      The benefit of this approach is that when we disable the
      `import/prefer-default-export` rule globally for the RFC, ESLint will
      warn about all of these now-unnecessary directives. This will make it
      much easier to address all of them (perhaps even automatically, via
      `--fix`!).
      
      [1]: https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20
      Unverified
      78947ddd
  9. Apr 02, 2020
  10. Mar 25, 2020
  11. Mar 20, 2020
  12. Mar 17, 2020
  13. Dec 19, 2019
  14. Oct 02, 2019
  15. Aug 08, 2019
  16. Jul 03, 2019
  17. Jun 06, 2019
  18. Apr 05, 2019
Loading