fix: apply ESLint rule vue/require-macro-variable-name

This commit is contained in:
iamsivin
2024-07-26 12:47:47 +05:30
parent 51ab7d4f9e
commit 0b2477c47e
11 changed files with 42 additions and 32 deletions
@@ -21,7 +21,7 @@ const props = defineProps({
},
});
const emits = defineEmits([
const emit = defineEmits([
'addFolders',
'deleteFolders',
'resetFilters',
@@ -30,7 +30,7 @@ const emits = defineEmits([
]);
const onBasicFilterChange = (value, type) => {
emits('basicFilterChange', value, type);
emit('basicFilterChange', value, type);
};
const hasAppliedFiltersOrActiveFolders = computed(() => {
@@ -68,7 +68,7 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
variant="smooth"
color-scheme="secondary"
icon="save"
@click="emits('addFolders')"
@click="emit('addFolders')"
/>
<woot-button
v-tooltip.top-end="$t('FILTER.CLEAR_BUTTON_LABEL')"
@@ -76,7 +76,7 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
variant="smooth"
color-scheme="alert"
icon="dismiss-circle"
@click="emits('resetFilters')"
@click="emit('resetFilters')"
/>
</div>
<div v-if="hasActiveFolders">
@@ -86,7 +86,7 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
variant="smooth"
color-scheme="secondary"
icon="edit"
@click="emits('filtersModal')"
@click="emit('filtersModal')"
/>
<woot-button
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.DELETE.DELETE_BUTTON')"
@@ -94,7 +94,7 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
variant="smooth"
color-scheme="alert"
icon="delete"
@click="emits('deleteFolders')"
@click="emit('deleteFolders')"
/>
</div>
<woot-button
@@ -104,7 +104,7 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
color-scheme="secondary"
icon="filter"
size="tiny"
@click="emits('filtersModal')"
@click="emit('filtersModal')"
/>
<ConversationBasicFilter
v-if="!hasAppliedFiltersOrActiveFolders"
@@ -38,13 +38,13 @@ const props = defineProps({
},
});
const emits = defineEmits(['onSearch']);
const emit = defineEmits(['onSearch']);
const searchTerm = ref('');
const onSearch = debounce(value => {
searchTerm.value = value;
emits('onSearch', value);
emit('onSearch', value);
}, 300);
const filteredListItems = computed(() => {
@@ -9,7 +9,7 @@ const props = defineProps({
},
});
const emits = defineEmits(['removeAttachment']);
const emit = defineEmits(['removeAttachment']);
const nonRecordedAudioAttachments = computed(() => {
return props.attachments.filter(attachment => !attachment?.isRecordedAudio);
@@ -20,7 +20,7 @@ const recordedAudioAttachments = computed(() =>
);
const onRemoveAttachment = itemIndex => {
emits(
emit(
'removeAttachment',
nonRecordedAudioAttachments.value
.filter((_, index) => index !== itemIndex)
@@ -28,7 +28,7 @@ const props = defineProps({
},
});
const emits = defineEmits(['update', 'close']);
const emit = defineEmits(['update', 'close']);
const { t } = useI18n();
@@ -45,12 +45,12 @@ const updateConversations = key => {
const ninja = document.querySelector('ninja-keys');
ninja?.open({ parent: 'bulk_action_snooze_conversation' });
} else {
emits('update', key);
emit('update', key);
}
};
const onClose = () => {
emits('close');
emit('close');
};
const showAction = key => {
@@ -75,7 +75,7 @@ const actionLabel = key => {
<template>
<div
v-on-clickaway="onClose"
class="absolute right-2 top-12 origin-top-right w-auto z-20 bg-white dark:bg-slate-800 rounded-lg border border-solid border-slate-50 dark:border-slate-700 shadow-md"
class="absolute z-20 w-auto origin-top-right bg-white border border-solid rounded-lg shadow-md right-2 top-12 dark:bg-slate-800 border-slate-50 dark:border-slate-700"
>
<div
class="right-[var(--triangle-position)] block z-10 absolute text-left -top-3"
@@ -15,7 +15,7 @@ const props = defineProps({
},
});
const emits = defineEmits(['close']);
const emit = defineEmits(['close']);
const { t } = useI18n();
@@ -40,7 +40,7 @@ const tabs = ref([
},
]);
const onClose = () => {
emits('close');
emit('close');
};
const onClickTabChange = index => {
@@ -18,7 +18,7 @@ const props = defineProps({
},
});
const emits = defineEmits(['close']);
const emit = defineEmits(['close']);
const { t } = useI18n();
const issues = ref([]);
@@ -49,7 +49,7 @@ const onSelectIssue = item => {
};
const onClose = () => {
emits('close');
emit('close');
};
const onSearch = async value => {