chore: Lintfix and format (no-changelog) (#13705)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-03-05 16:50:43 +01:00
committed by GitHub
parent 9e83ff51da
commit d2dd1796a8
45 changed files with 66 additions and 70 deletions

View File

@@ -5,11 +5,10 @@ import { getDropdownItems } from '@/__tests__/utils';
import { createProjectListItem } from '@/__tests__/data/projects';
import { createUser } from '@/__tests__/data/users';
import { DELETE_USER_MODAL_KEY } from '@/constants';
import { DELETE_USER_MODAL_KEY, STORES } from '@/constants';
import { ProjectTypes } from '@/types/projects.types';
import userEvent from '@testing-library/user-event';
import { useUsersStore } from '@/stores/users.store';
import { STORES } from '@/constants';
const ModalStub = {
template: `

View File

@@ -424,9 +424,9 @@ async function onAskAssistantClick() {
</div>
<div
v-if="(error.description || error.context?.descriptionKey) && !isSubNodeError"
v-n8n-html="getErrorDescription()"
data-test-id="node-error-description"
class="node-error-view__header-description"
v-n8n-html="getErrorDescription()"
></div>
<div v-if="isSubNodeError">

View File

@@ -185,9 +185,9 @@ const onResizeThrottle = useThrottleFn(onResize, 10);
{{ i18n.baseText('expressionEdit.expression') }}
</N8nText>
<N8nText
v-n8n-html="i18n.baseText('expressionTip.javascript')"
:class="$style.tip"
size="small"
v-n8n-html="i18n.baseText('expressionTip.javascript')"
/>
</div>

View File

@@ -53,7 +53,7 @@ onBeforeUnmount(() => {
>
</ExpressionOutput>
</n8n-text>
<div :class="$style.footer" v-if="!isReadOnly">
<div v-if="!isReadOnly" :class="$style.footer">
<InlineExpressionTip
:editor-state="editorState"
:selection="selection"

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import { nextTick } from 'vue';
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
import type { EventBus } from '@n8n/utils/event-bus';
import { createEventBus } from '@n8n/utils/event-bus';

View File

@@ -63,7 +63,7 @@ onMounted(() => {
<template>
<div :class="containerClasses" data-test-id="n8n-logo">
<LogoIcon :class="$style.logo" ref="logo" />
<LogoIcon ref="logo" :class="$style.logo" />
<LogoText v-if="showLogoText" :class="$style.logoText" />
<div v-if="showReleaseChannelTag" :class="$style.releaseChannelTag">{{ releaseChannel }}</div>
<slot />

View File

@@ -11,8 +11,8 @@ withDefaults(defineProps<Props>(), {
<template>
<div
:class="[$style.dragPill, canDrop ? $style.droppablePill : $style.defaultPill]"
v-n8n-html="html"
:class="[$style.dragPill, canDrop ? $style.droppablePill : $style.defaultPill]"
/>
</template>

View File

@@ -101,7 +101,7 @@ onBeforeUnmount(() => {
<template>
<div v-if="!createNodeActive" :class="$style.nodeButtonsWrapper">
<div :class="$style.nodeCreatorButton" ref="wrapperRef" data-test-id="node-creator-plus-button">
<div ref="wrapperRef" :class="$style.nodeCreatorButton" data-test-id="node-creator-plus-button">
<KeyboardShortcutTooltip
:label="i18n.baseText('nodeView.openNodesPanel')"
:shortcut="{ keys: ['Tab'] }"

View File

@@ -145,8 +145,6 @@ function onCommunityNodeTooltipClick(event: MouseEvent) {
<template v-if="isCommunityNode" #tooltip>
<p
:class="$style.communityNodeIcon"
@click="onCommunityNodeTooltipClick"
v-n8n-html="
i18n.baseText('generic.communityNode.tooltip', {
interpolate: {
@@ -155,12 +153,14 @@ function onCommunityNodeTooltipClick(event: MouseEvent) {
},
})
"
:class="$style.communityNodeIcon"
@click="onCommunityNodeTooltipClick"
/>
</template>
<template #dragContent>
<div
ref="draggableDataTransfer"
v-show="dragging"
ref="draggableDataTransfer"
:class="$style.draggable"
:style="draggableStyle"
>

View File

@@ -250,9 +250,9 @@ onMounted(() => {
</template>
<template v-else #empty>
<p
v-n8n-html="i18n.baseText('nodeCreator.actionsCategory.noMatchingTriggers')"
:class="$style.resetSearch"
@click="resetSearch"
v-n8n-html="i18n.baseText('nodeCreator.actionsCategory.noMatchingTriggers')"
/>
</template>
</CategorizedItemsRenderer>
@@ -289,10 +289,10 @@ onMounted(() => {
</n8n-info-tip>
<p
v-else
v-n8n-html="i18n.baseText('nodeCreator.actionsCategory.noMatchingActions')"
:class="$style.resetSearch"
data-test-id="actions-panel-no-matching-actions"
@click="resetSearch"
v-n8n-html="i18n.baseText('nodeCreator.actionsCategory.noMatchingActions')"
/>
</template>
</CategorizedItemsRenderer>
@@ -300,12 +300,12 @@ onMounted(() => {
</OrderSwitcher>
<div v-if="containsAPIAction" :class="$style.apiHint">
<span
@click.prevent="addHttpNode"
v-n8n-html="
i18n.baseText('nodeCreator.actionsList.apiCall', {
interpolate: { node: subcategory ?? '' },
})
"
@click.prevent="addHttpNode"
/>
</div>
</div>

View File

@@ -136,7 +136,7 @@ watch(
:elements="item.children"
expanded
:category="item.title"
@selected="(child) => wrappedEmit('selected', child)"
@selected="(child: INodeCreateElement) => wrappedEmit('selected', child)"
>
</CategorizedItemsRenderer>

View File

@@ -85,7 +85,7 @@ const nodeType = computed((): INodeTypeDescription | null => {
});
const isNodeRunning = computed(() => {
if (!uiStore.isActionActive['workflowRunning'] || codeGenerationInProgress.value) return false;
if (!uiStore.isActionActive.workflowRunning || codeGenerationInProgress.value) return false;
const triggeredNode = workflowsStore.executedNode;
return (
workflowsStore.isNodeExecuting(node.value?.name ?? '') || triggeredNode === node.value?.name

View File

@@ -1013,7 +1013,7 @@ async function optionSelected(command: string) {
onMounted(() => {
props.eventBus.on('optionSelected', optionSelected);
tempValue.value = displayValue.value as string;
tempValue.value = displayValue.value;
if (node.value) {
nodeName.value = node.value.name;
@@ -1029,7 +1029,7 @@ onMounted(() => {
displayValue.value !== null &&
displayValue.value.toString().charAt(0) !== '#'
) {
const newValue = rgbaToHex(displayValue.value as string);
const newValue = rgbaToHex(displayValue.value);
if (newValue !== null) {
tempValue.value = newValue;
}
@@ -1100,12 +1100,12 @@ watch(
// Do not set for color with alpha else wrong value gets displayed in field
return;
}
tempValue.value = displayValue.value as string;
tempValue.value = displayValue.value;
},
);
watch(remoteParameterOptionsLoading, () => {
tempValue.value = displayValue.value as string;
tempValue.value = displayValue.value;
});
// Focus input field when changing between fixed and expression
@@ -1625,8 +1625,8 @@ onUpdated(async () => {
</div>
<div
v-if="option.description"
class="option-description"
v-n8n-html="getOptionsOptionDescription(option)"
class="option-description"
></div>
</div>
</N8nOption>
@@ -1658,8 +1658,8 @@ onUpdated(async () => {
<div class="option-headline">{{ getOptionsOptionDisplayName(option) }}</div>
<div
v-if="option.description"
class="option-description"
v-n8n-html="getOptionsOptionDescription(option)"
class="option-description"
></div>
</div>
</N8nOption>

View File

@@ -46,13 +46,13 @@ const simplyText = computed(() => {
[$style.highlight]: highlight,
}"
>
<span data-test-id="parameter-input-hint" v-n8n-html="simplyText"></span>
<span v-n8n-html="simplyText" data-test-id="parameter-input-hint"></span>
</div>
<div
v-else
ref="hintTextRef"
:class="{ [$style.singleline]: singleLine, [$style.highlight]: highlight }"
v-n8n-html="sanitizeHtml(hint)"
:class="{ [$style.singleline]: singleLine, [$style.highlight]: highlight }"
></div>
</n8n-text>
</template>

View File

@@ -1,7 +1,6 @@
import { renderComponent } from '@/__tests__/render';
import userEvent from '@testing-library/user-event';
import { within } from '@testing-library/vue';
import { waitFor } from '@testing-library/vue';
import { within, waitFor } from '@testing-library/vue';
import ParameterOptions from './ParameterOptions.vue';
import { setActivePinia, createPinia } from 'pinia';

View File

@@ -131,7 +131,7 @@ defineExpose({
<div class="option-headline">
{{ option.name }}
</div>
<div class="option-description" v-n8n-html="option.description" />
<div v-n8n-html="option.description" class="option-description" />
</div>
</N8nOption>
</N8nSelect>

View File

@@ -431,7 +431,7 @@ watch(refDebounced(search, 500), (term) => {
</div>
</template>
<template #content>
<div :class="[$style.table]" v-if="changes.workflows.length">
<div v-if="changes.workflows.length" :class="[$style.table]">
<div :class="[$style.tableHeader]">
<N8nCheckbox
:class="$style.selectAll"

View File

@@ -9,7 +9,7 @@ defineProps<{
<div class="titled-list">
<p v-text="title" />
<ul>
<li v-for="item in items" :key="item" class="titled-list-item" v-n8n-html="item" />
<li v-for="item in items" :key="item" v-n8n-html="item" class="titled-list-item" />
</ul>
</div>
</template>

View File

@@ -163,7 +163,7 @@ const isListeningForEvents = computed(() => {
});
const workflowRunning = computed(() => {
return uiStore.isActionActive['workflowRunning'];
return uiStore.isActionActive.workflowRunning;
});
const isActivelyPolling = computed(() => {

View File

@@ -55,8 +55,8 @@ const nodeName = (node: IVersionNode): string => {
<div>
<div
v-if="version.description"
:class="$style.description"
v-n8n-html="version.description"
:class="$style.description"
></div>
<div v-if="version.nodes && version.nodes.length > 0" :class="$style.nodes">
<NodeIcon

View File

@@ -216,8 +216,8 @@ watch(
<n8n-tooltip placement="top">
<template #content>
<div
@click="displayActivationError"
v-n8n-html="i18n.baseText('workflowActivator.theWorkflowIsSetToBeActiveBut')"
@click="displayActivationError"
></div>
</template>
<font-awesome-icon icon="exclamation-triangle" @click="displayActivationError" />

View File

@@ -257,8 +257,8 @@ onBeforeMount(() => {
}}</label>
<AnnotationTagsDropdown
id="execution-filter-annotation-tags"
:placeholder="locale.baseText('workflowOpen.filterWorkflows')"
v-model="filter.annotationTags"
:placeholder="locale.baseText('workflowOpen.filterWorkflows')"
:create-enabled="false"
data-test-id="executions-filter-annotation-tags-select"
@update:model-value="onAnnotationTagsChange"

View File

@@ -177,7 +177,7 @@ const onTagsEditEsc = () => {
>
<div
v-for="attr in Object.keys(activeExecution?.customData)"
v-bind:key="attr"
:key="attr"
:class="$style.customDataEntry"
>
<n8n-text :class="$style.key" size="small" color="text-base">

View File

@@ -144,8 +144,13 @@ const slots = defineSlots<{
filters: Record<string, boolean | string | string[]>;
setKeyValue: (key: string, value: unknown) => void;
}): unknown;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
default(props: { data: any; updateItemSize: (data: any) => void }): unknown;
default(props: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data: any;
columns?: DatatableColumn[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
updateItemSize?: (data: any) => void;
}): unknown;
item(props: { item: unknown; index: number }): unknown;
breadcrumbs(): unknown;
}>();
@@ -418,7 +423,7 @@ const getColumns = () => {
if ('columns' in props.typeProps) {
return props.typeProps.columns;
}
return {};
return [];
};
const sendSortingTelemetry = () => {