refactor: Lintfix and format (no-changelog)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2025-03-05 13:16:26 +01:00
parent 8790a0df3d
commit e5222021d4
No known key found for this signature in database
45 changed files with 64 additions and 69 deletions

View file

@ -130,7 +130,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
service-name: [ 'mysql-8.0.13', 'mysql-8.4' ]
service-name: ['mysql-8.0.13', 'mysql-8.4']
env:
DB_MYSQLDB_PASSWORD: password
steps:

View file

@ -15,7 +15,7 @@ github_checks:
flags:
tests:
paths:
- "**"
- '**'
carryforward: true
component_management:
@ -24,7 +24,7 @@ component_management:
- type: project
target: auto
branches:
- "!master"
- '!master'
individual_components:
- component_id: backend_packages
name: Backend

View file

@ -65,7 +65,7 @@ withDefaults(defineProps<ActionBoxProps>(), {
:class="$style.callout"
>
<N8nText color="text-base">
<span size="small" v-n8n-html="calloutText"></span>
<span v-n8n-html="calloutText" size="small"></span>
</N8nText>
</N8nCallout>
</div>

View file

@ -71,7 +71,7 @@ const onTooltipClick = (item: string, event: MouseEvent) => emit('tooltipClick',
<div v-for="item in items" :key="item.id" :class="$style.accordionItem">
<n8n-tooltip :disabled="!item.tooltip">
<template #content>
<div @click="onTooltipClick(item.id, $event)" v-n8n-html="item.tooltip"></div>
<div v-n8n-html="item.tooltip" @click="onTooltipClick(item.id, $event)"></div>
</template>
<N8nIcon :icon="item.icon" :color="item.iconColor" size="small" class="mr-2xs" />
</n8n-tooltip>

View file

@ -198,11 +198,11 @@ const onCheckboxChange = (index: number) => {
<div
v-if="!loading"
ref="editor"
v-n8n-html="htmlContent"
:class="$style[theme]"
@click="onClick"
@mousedown="onMouseDown"
@change="onChange"
v-n8n-html="htmlContent"
/>
<div v-else :class="$style.markdown">
<div v-for="(_, index) in loadingBlocks" :key="index">

View file

@ -74,9 +74,9 @@ const onClick = (event: MouseEvent) => {
<slot>
<span
:id="`${id}-content`"
v-n8n-html="displayContent"
:class="showFullContent ? $style['expanded'] : $style['truncated']"
role="region"
v-n8n-html="displayContent"
/>
</slot>
</N8nText>

View file

@ -90,7 +90,7 @@ const scrollRight = () => scroll(50);
>
<N8nTooltip :disabled="!option.tooltip" placement="bottom">
<template #content>
<div @click="handleTooltipClick(option.value, $event)" v-n8n-html="option.tooltip" />
<div v-n8n-html="option.tooltip" @click="handleTooltipClick(option.value, $event)" />
</template>
<a
v-if="option.href"

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

@ -987,7 +987,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;
@ -1003,7 +1003,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;
}
@ -1074,12 +1074,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
@ -1598,8 +1598,8 @@ onUpdated(async () => {
</div>
<div
v-if="option.description"
class="option-description"
v-n8n-html="getOptionsOptionDescription(option)"
class="option-description"
></div>
</div>
</N8nOption>
@ -1631,8 +1631,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

@ -145,7 +145,11 @@ const slots = defineSlots<{
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: {
data: any;
columns?: DatatableColumn[];
updateItemSize?: (data: any) => void;
}): unknown;
item(props: { item: unknown; index: number }): unknown;
breadcrumbs(): unknown;
}>();
@ -418,7 +422,7 @@ const getColumns = () => {
if ('columns' in props.typeProps) {
return props.typeProps.columns;
}
return {};
return [];
};
const sendSortingTelemetry = () => {

View file

@ -1,11 +1,12 @@
import { deepCopy } from 'n8n-workflow';
import type {
IDataObject,
IRunExecutionData,
NodeApiError,
NodeError,
NodeOperationError,
INode,
} from 'n8n-workflow';
import { deepCopy, type INode } from 'n8n-workflow';
import { useWorkflowHelpers } from './useWorkflowHelpers';
import { useRouter } from 'vue-router';
import { useNDVStore } from '@/stores/ndv.store';

View file

@ -1684,9 +1684,9 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
nodeHelpers.assignWebhookId(node);
if (node.parameters.path) {
node.parameters.path = node.webhookId as string;
node.parameters.path = node.webhookId;
} else if ((node.parameters.options as IDataObject).path) {
(node.parameters.options as IDataObject).path = node.webhookId as string;
(node.parameters.options as IDataObject).path = node.webhookId;
}
}
}

View file

@ -155,7 +155,7 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
receivedData.type === 'nodeExecuteBefore' ||
receivedData.type === 'executionStarted'
) {
if (!uiStore.isActionActive['workflowRunning']) {
if (!uiStore.isActionActive.workflowRunning) {
// No workflow is running so ignore the messages
return false;
}
@ -198,7 +198,7 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
}
if (receivedData.type === 'executionFinished' || receivedData.type === 'executionRecovered') {
if (!uiStore.isActionActive['workflowRunning']) {
if (!uiStore.isActionActive.workflowRunning) {
// No workflow is running so ignore the messages
return false;
}

View file

@ -102,7 +102,7 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
}): Promise<IExecutionPushResponse | undefined> {
const workflow = workflowHelpers.getCurrentWorkflow();
if (uiStore.isActionActive['workflowRunning']) {
if (uiStore.isActionActive.workflowRunning) {
return;
}

View file

@ -395,7 +395,7 @@ export function executeData(
!workflowRunData[parentNodeName][runIndex] ||
!workflowRunData[parentNodeName][runIndex].hasOwnProperty('data') ||
workflowRunData[parentNodeName][runIndex].data === undefined ||
!workflowRunData[parentNodeName][runIndex].data!.hasOwnProperty(inputName)
!workflowRunData[parentNodeName][runIndex].data.hasOwnProperty(inputName)
) {
executeData.data = {};
} else {

View file

@ -61,6 +61,7 @@ import {
NodeHelpers,
SEND_AND_WAIT_OPERATION,
Workflow,
TelemetryHelpers,
} from 'n8n-workflow';
import { findLast, pick, isEqual } from 'lodash-es';
@ -82,7 +83,6 @@ import { useProjectsStore } from '@/stores/projects.store';
import type { ProjectSharingData } from '@/types/projects.types';
import type { PushPayload } from '@n8n/api-types';
import { useTelemetry } from '@/composables/useTelemetry';
import { TelemetryHelpers } from 'n8n-workflow';
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
import { useRouter } from 'vue-router';
import { useSettingsStore } from './settings.store';

View file

@ -13,7 +13,7 @@ const getBrowserId = () => {
browserId = crypto.randomUUID();
localStorage.setItem(BROWSER_ID_STORAGE_KEY, browserId);
}
return browserId!;
return browserId;
};
export const NO_NETWORK_ERROR_CODE = 999;

View file

@ -37,7 +37,7 @@ export function updateDynamicConnections(
parameterData.name === 'parameters.options.fallbackOutput'
) {
const curentFallbackOutput = (node.parameters?.options as { fallbackOutput: string })
?.fallbackOutput as string;
?.fallbackOutput;
if (curentFallbackOutput === 'extra') {
if (!parameterData.value || parameterData.value !== 'extra') {
connections[node.name].main = connections[node.name].main.slice(0, -1);

View file

@ -284,7 +284,7 @@ export function getGenericHints({
if (hasNodeRun && workflowNode.parameters.limit) {
if (nodeOutputData.length === workflowNode.parameters.limit) {
nodeHints.push({
message: `Limit of ${workflowNode.parameters.limit as number} items reached. There may be more items that aren't being returned. Tweak the 'Return All' or 'Limit' parameters to access more items.`,
message: `Limit of ${workflowNode.parameters.limit} items reached. There may be more items that aren't being returned. Tweak the 'Return All' or 'Limit' parameters to access more items.`,
location: 'outputPane',
whenToDisplay: 'afterExecution',
});

View file

@ -7,8 +7,7 @@ import { useUsersStore } from '@/stores/users.store';
import type { IUser } from '@/Interface';
import { useI18n } from '@/composables/useI18n';
import { useProjectsStore } from '@/stores/projects.store';
import type { ProjectIcon } from '@/types/projects.types';
import { type Project, type ProjectRelation } from '@/types/projects.types';
import type { ProjectIcon, Project, ProjectRelation } from '@/types/projects.types';
import { useToast } from '@/composables/useToast';
import { VIEWS } from '@/constants';
import ProjectDeleteDialog from '@/components/Projects/ProjectDeleteDialog.vue';

View file

@ -10,15 +10,12 @@ import type { PublicInstalledPackage } from 'n8n-workflow';
import { useCommunityNodesStore } from '@/stores/communityNodes.store';
import { useUIStore } from '@/stores/ui.store';
import { onBeforeUnmount, ref } from 'vue';
import { onBeforeUnmount, ref, computed, onBeforeMount, onMounted } from 'vue';
import { useExternalHooks } from '@/composables/useExternalHooks';
import { useRouter } from 'vue-router';
import { usePushConnection } from '@/composables/usePushConnection';
import { usePushConnectionStore } from '@/stores/pushConnection.store';
import { computed } from 'vue';
import { useI18n } from '@/composables/useI18n';
import { onBeforeMount } from 'vue';
import { onMounted } from 'vue';
import { useTelemetry } from '@/composables/useTelemetry';
const PACKAGE_COUNT_THRESHOLD = 31;

View file

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, nextTick, onBeforeMount, onMounted } from 'vue';
import { computed, nextTick, onBeforeMount, onMounted, ref, getCurrentInstance } from 'vue';
import { v4 as uuid } from 'uuid';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { hasPermission } from '@/utils/rbac/permissions';
@ -13,7 +13,6 @@ import { deepCopy, defaultMessageEventBusDestinationOptions } from 'n8n-workflow
import EventDestinationCard from '@/components/SettingsLogStreaming/EventDestinationCard.ee.vue';
import { createEventBus } from '@n8n/utils/event-bus';
import { useDocumentTitle } from '@/composables/useDocumentTitle';
import { ref, getCurrentInstance } from 'vue';
import { useI18n } from '@/composables/useI18n';
import { usePageRedirectionHelper } from '@/composables/usePageRedirectionHelper';

View file

@ -139,9 +139,7 @@ async function onSubmit(values: { [key: string]: string | boolean }) {
}
function getQueryParameter(key: 'inviterId' | 'inviteeId'): string | null {
return !route.query[key] || typeof route.query[key] !== 'string'
? null
: (route.query[key] as string);
return !route.query[key] || typeof route.query[key] !== 'string' ? null : route.query[key];
}
</script>

View file

@ -315,7 +315,7 @@ export async function prepareFormReturnItem(
if (field.fieldType === 'html') {
if (field.elementName) {
returnItem.json[field.elementName as string] = value;
returnItem.json[field.elementName] = value;
}
continue;
}