Commit c36b7aa0 authored by sstern's avatar sstern

Replace underscore with lodash

parent 1438907f
<script>
import { createNamespacedHelpers, mapState, mapActions } from 'vuex';
import _ from 'underscore';
import { escape as esc } from 'lodash';
import { GlFormInput, GlFormCheckbox } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale';
import ClusterFormDropdown from '~/create_cluster/components/cluster_form_dropdown.vue';
......@@ -133,7 +133,7 @@ export default {
: s__('ClusterIntegration|Create Kubernetes cluster');
},
kubernetesIntegrationHelpText() {
const escapedUrl = _.escape(this.kubernetesIntegrationHelpPath);
const escapedUrl = esc(this.kubernetesIntegrationHelpPath);
return sprintf(
s__(
......@@ -245,7 +245,7 @@ export default {
);
},
gitlabManagedHelpText() {
const escapedUrl = _.escape(this.gitlabManagedClusterHelpPath);
const escapedUrl = esc(this.gitlabManagedClusterHelpPath);
return sprintf(
s__(
......
<script>
import { GlFormInput } from '@gitlab/ui';
import _ from 'underscore';
import { escape as esc } from 'lodash';
import { mapState, mapActions } from 'vuex';
import { sprintf, s__, __ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
......@@ -42,7 +42,7 @@ export default {
: s__('ClusterIntegration|Authenticate with AWS');
},
accountAndExternalIdsHelpText() {
const escapedUrl = _.escape(this.accountAndExternalIdsHelpPath);
const escapedUrl = esc(this.accountAndExternalIdsHelpPath);
return sprintf(
s__(
......@@ -59,7 +59,7 @@ export default {
);
},
provisionRoleArnHelpText() {
const escapedUrl = _.escape(this.createRoleArnHelpPath);
const escapedUrl = esc(this.createRoleArnHelpPath);
return sprintf(
s__(
......
import _ from 'underscore';
import { GlLoadingIcon } from '@gitlab/ui';
import DropdownSearchInput from '~/vue_shared/components/dropdown/dropdown_search_input.vue';
import DropdownHiddenInput from '~/vue_shared/components/dropdown/dropdown_hidden_input.vue';
......@@ -49,7 +48,7 @@ export default {
methods: {
fetchSuccessHandler() {
if (this.defaultValue) {
const itemToSelect = _.find(this.items, item => item.name === this.defaultValue);
const itemToSelect = this.items.find(item => item.name === this.defaultValue);
if (itemToSelect) {
this.setItem(itemToSelect.name);
......
<script>
import _ from 'underscore';
import { escape as esc } from 'lodash';
import { mapState, mapGetters, mapActions } from 'vuex';
import { s__, sprintf } from '~/locale';
......@@ -65,7 +65,7 @@ export default {
s__(message),
{
docsLinkEnd: '&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>',
docsLinkStart: `<a href="${_.escape(
docsLinkStart: `<a href="${esc(
this.docsUrl,
)}" target="_blank" rel="noopener noreferrer">`,
},
......@@ -119,7 +119,7 @@ export default {
...mapActions({ setItem: 'setProject' }),
fetchSuccessHandler() {
if (this.defaultValue) {
const projectToSelect = _.find(this.items, item => item.projectId === this.defaultValue);
const projectToSelect = this.items.find(item => item.projectId === this.defaultValue);
if (projectToSelect) {
this.setItem(projectToSelect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment