diff --git a/packages/@n8n_io/eslint-config/frontend.js b/packages/@n8n_io/eslint-config/frontend.js index 91379afd1a..ef1a315e73 100644 --- a/packages/@n8n_io/eslint-config/frontend.js +++ b/packages/@n8n_io/eslint-config/frontend.js @@ -16,12 +16,7 @@ module.exports = { overrides: [ { - files: [ - '**/*.test.ts', - '**/test/**/*.ts', - '**/__tests__/**/*.ts', - '**/*.stories.ts', - ], + files: ['**/*.test.ts', '**/test/**/*.ts', '**/__tests__/**/*.ts', '**/*.stories.ts'], rules: { 'import/no-extraneous-dependencies': 'off', }, @@ -60,6 +55,7 @@ module.exports = { 'vue/prop-name-casing': ['error', 'camelCase'], 'vue/attribute-hyphenation': ['error', 'always'], 'import/no-extraneous-dependencies': 'warn', + 'vue/define-emits-declaration': ['error', 'type-literal'], // TODO: fix these '@typescript-eslint/no-unsafe-call': 'off', diff --git a/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue b/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue index 8479e8842e..11817b5f80 100644 --- a/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue +++ b/packages/design-system/src/components/N8nActionDropdown/ActionDropdown.vue @@ -102,8 +102,8 @@ const getItemClasses = (item: ActionDropdownItem): Record => { }; const $emit = defineEmits<{ - (event: 'select', action: string): void; - (event: 'visibleChange', open: boolean): void; + select: [action: string]; + visibleChange: [open: boolean]; }>(); const elementDropdown = ref>(); diff --git a/packages/design-system/src/components/N8nActionToggle/ActionToggle.vue b/packages/design-system/src/components/N8nActionToggle/ActionToggle.vue index a2a38955be..373a08e904 100644 --- a/packages/design-system/src/components/N8nActionToggle/ActionToggle.vue +++ b/packages/design-system/src/components/N8nActionToggle/ActionToggle.vue @@ -69,8 +69,8 @@ withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'action', value: string): void; - (event: 'visible-change', value: boolean): void; + action: [value: string]; + 'visible-change': [value: boolean]; }>(); const onCommand = (value: string) => $emit('action', value); const onVisibleChange = (value: boolean) => $emit('visible-change', value); diff --git a/packages/design-system/src/components/N8nCheckbox/Checkbox.vue b/packages/design-system/src/components/N8nCheckbox/Checkbox.vue index b0af416f42..cddfa56ad4 100644 --- a/packages/design-system/src/components/N8nCheckbox/Checkbox.vue +++ b/packages/design-system/src/components/N8nCheckbox/Checkbox.vue @@ -45,10 +45,11 @@ withDefaults(defineProps(), { labelSize: 'medium', }); -const $emit = defineEmits<{ - (event: 'update:modelValue', value: CheckboxValueType): void; +const emit = defineEmits<{ + 'update:modelValue': [value: CheckboxValueType]; }>(); -const onUpdateModelValue = (value: CheckboxValueType) => $emit('update:modelValue', value); + +const onUpdateModelValue = (value: CheckboxValueType) => emit('update:modelValue', value); const checkbox = ref>(); const onLabelClick = () => { diff --git a/packages/design-system/src/components/N8nColorPicker/ColorPicker.vue b/packages/design-system/src/components/N8nColorPicker/ColorPicker.vue index 3997308c86..d4e461809e 100644 --- a/packages/design-system/src/components/N8nColorPicker/ColorPicker.vue +++ b/packages/design-system/src/components/N8nColorPicker/ColorPicker.vue @@ -36,9 +36,9 @@ const colorPickerProps = computed(() => { }); const emit = defineEmits<{ - (event: 'update:modelValue', value: string | null): void; - (event: 'change', value: string | null): void; - (event: 'active-change', value: string | null): void; + 'update:modelValue': [value: string | null]; + change: [value: string | null]; + 'active-change': [value: string | null]; }>(); const onChange = (value: string | null) => { diff --git a/packages/design-system/src/components/N8nDatatable/Datatable.vue b/packages/design-system/src/components/N8nDatatable/Datatable.vue index 08c24406d3..377a081c10 100644 --- a/packages/design-system/src/components/N8nDatatable/Datatable.vue +++ b/packages/design-system/src/components/N8nDatatable/Datatable.vue @@ -85,8 +85,8 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'update:currentPage', value: number): void; - (event: 'update:rowsPerPage', value: number): void; + 'update:currentPage': [value: number]; + 'update:rowsPerPage': [value: number]; }>(); const { t } = useI18n(); diff --git a/packages/design-system/src/components/N8nFormBox/FormBox.vue b/packages/design-system/src/components/N8nFormBox/FormBox.vue index 19b6a18c2d..b234c54180 100644 --- a/packages/design-system/src/components/N8nFormBox/FormBox.vue +++ b/packages/design-system/src/components/N8nFormBox/FormBox.vue @@ -69,9 +69,9 @@ withDefaults(defineProps(), { const formBus = createEventBus(); const $emit = defineEmits<{ - (event: 'submit', value: { [key: string]: Value }): void; - (event: 'update', value: { name: string; value: Value }): void; - (event: 'secondaryClick', value: Event): void; + submit: [value: { [key: string]: Value }]; + update: [value: { name: string; value: Value }]; + secondaryClick: [value: Event]; }>(); const onUpdateModelValue = (e: { name: string; value: Value }) => $emit('update', e); diff --git a/packages/design-system/src/components/N8nFormInput/FormInput.vue b/packages/design-system/src/components/N8nFormInput/FormInput.vue index a5ff244b48..b897d73fc7 100644 --- a/packages/design-system/src/components/N8nFormInput/FormInput.vue +++ b/packages/design-system/src/components/N8nFormInput/FormInput.vue @@ -158,11 +158,11 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'validate', shouldValidate: boolean): void; - (event: 'update:modelValue', value: Validatable): void; - (event: 'focus'): void; - (event: 'blur'): void; - (event: 'enter'): void; + validate: [shouldValidate: boolean]; + 'update:modelValue': [value: Validatable]; + focus: []; + blur: []; + enter: []; }>(); const state = reactive({ diff --git a/packages/design-system/src/components/N8nFormInputs/FormInputs.vue b/packages/design-system/src/components/N8nFormInputs/FormInputs.vue index be74e1170a..878b8b19c0 100644 --- a/packages/design-system/src/components/N8nFormInputs/FormInputs.vue +++ b/packages/design-system/src/components/N8nFormInputs/FormInputs.vue @@ -27,10 +27,10 @@ const props = withDefaults(defineProps(), { }); const emit = defineEmits<{ - (name: 'update', _: { name: string; value: Value }): boolean; - (name: 'update:modelValue', value: Record): boolean; - (name: 'submit', value: Record): boolean; - (name: 'ready', value: boolean): boolean; + update: [value: { name: string; value: Value }]; + 'update:modelValue': [value: Record]; + submit: [value: Record]; + ready: [value: boolean]; }>(); const showValidationWarnings = ref(false); diff --git a/packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.vue b/packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.vue index c820547b4a..d2cf91a86d 100644 --- a/packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.vue +++ b/packages/design-system/src/components/N8nInfoAccordion/InfoAccordion.vue @@ -69,8 +69,8 @@ const props = withDefaults(defineProps(), { eventBus: () => createEventBus(), }); const $emit = defineEmits<{ - (name: 'click:body', e: MouseEvent): void; - (name: 'tooltipClick', item: string, e: MouseEvent): void; + 'click:body': [e: MouseEvent]; + tooltipClick: [item: string, e: MouseEvent]; }>(); const expanded = ref(false); diff --git a/packages/design-system/src/components/N8nMarkdown/Markdown.vue b/packages/design-system/src/components/N8nMarkdown/Markdown.vue index fe2f55c844..ba9befe8f2 100644 --- a/packages/design-system/src/components/N8nMarkdown/Markdown.vue +++ b/packages/design-system/src/components/N8nMarkdown/Markdown.vue @@ -156,8 +156,8 @@ const htmlContent = computed(() => { }); const $emit = defineEmits<{ - (event: 'markdown-click', link: string, e: MouseEvent): void; - (event: 'update-content', content: string): void; + 'markdown-click': [link: string, e: MouseEvent]; + 'update-content': [content: string]; }>(); const onClick = (event: MouseEvent) => { diff --git a/packages/design-system/src/components/N8nMenu/Menu.vue b/packages/design-system/src/components/N8nMenu/Menu.vue index 321259d80b..2062e07070 100644 --- a/packages/design-system/src/components/N8nMenu/Menu.vue +++ b/packages/design-system/src/components/N8nMenu/Menu.vue @@ -83,8 +83,8 @@ const props = withDefaults(defineProps(), { const $route = useRoute(); const $emit = defineEmits<{ - (event: 'select', itemId: string): void; - (event: 'update:modelValue', itemId: string): void; + select: [itemId: string]; + 'update:modelValue': [itemId: string]; }>(); const activeTab = ref(props.modelValue); diff --git a/packages/design-system/src/components/N8nNodeCreatorNode/NodeCreatorNode.vue b/packages/design-system/src/components/N8nNodeCreatorNode/NodeCreatorNode.vue index 877b79277f..909db76930 100644 --- a/packages/design-system/src/components/N8nNodeCreatorNode/NodeCreatorNode.vue +++ b/packages/design-system/src/components/N8nNodeCreatorNode/NodeCreatorNode.vue @@ -18,7 +18,7 @@ export interface Props { defineProps(); defineEmits<{ - (event: 'tooltipClick', $e: MouseEvent): void; + tooltipClick: [e: MouseEvent]; }>(); const { t } = useI18n(); diff --git a/packages/design-system/src/components/N8nNotice/Notice.vue b/packages/design-system/src/components/N8nNotice/Notice.vue index 7573777722..8d2b90f4eb 100644 --- a/packages/design-system/src/components/N8nNotice/Notice.vue +++ b/packages/design-system/src/components/N8nNotice/Notice.vue @@ -36,7 +36,7 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'action', key: string): void; + action: [key: string]; }>(); const $style = useCssModule(); diff --git a/packages/design-system/src/components/N8nRadioButtons/RadioButtons.vue b/packages/design-system/src/components/N8nRadioButtons/RadioButtons.vue index 6b8cca2e0c..d4f62ee0fd 100644 --- a/packages/design-system/src/components/N8nRadioButtons/RadioButtons.vue +++ b/packages/design-system/src/components/N8nRadioButtons/RadioButtons.vue @@ -39,7 +39,7 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'update:modelValue', value: string, e: MouseEvent): void; + 'update:modelValue': [value: string, e: MouseEvent]; }>(); const onClick = ( diff --git a/packages/design-system/src/components/N8nResizeWrapper/ResizeWrapper.vue b/packages/design-system/src/components/N8nResizeWrapper/ResizeWrapper.vue index 4cb155aa91..5a6d524cac 100644 --- a/packages/design-system/src/components/N8nResizeWrapper/ResizeWrapper.vue +++ b/packages/design-system/src/components/N8nResizeWrapper/ResizeWrapper.vue @@ -80,9 +80,9 @@ export interface ResizeData { } const $emit = defineEmits<{ - (event: 'resizestart'): void; - (event: 'resize', value: ResizeData): void; - (event: 'resizeend'): void; + resizestart: []; + resize: [value: ResizeData]; + resizeend: []; }>(); const enabledDirections = computed((): Direction[] => { diff --git a/packages/design-system/src/components/N8nSticky/Sticky.vue b/packages/design-system/src/components/N8nSticky/Sticky.vue index f037f165bd..b258171fda 100644 --- a/packages/design-system/src/components/N8nSticky/Sticky.vue +++ b/packages/design-system/src/components/N8nSticky/Sticky.vue @@ -94,13 +94,13 @@ const props = withDefaults(defineProps(), { backgroundColor: 1, }); -const $emit = defineEmits<{ - (event: 'edit', editing: boolean): void; - (event: 'update:modelValue', value: string): void; - (event: 'markdown-click', link: string, e: Event): void; - (event: 'resize', values: ResizeData): void; - (event: 'resizestart'): void; - (event: 'resizeend'): void; +const emit = defineEmits<{ + edit: [editing: boolean]; + 'update:modelValue': [value: string]; + 'markdown-click': [link: string, e: Event]; + resize: [values: ResizeData]; + resizestart: []; + resizeend: []; }>(); const { t } = useI18n(); @@ -137,33 +137,33 @@ watch( ); const onDoubleClick = () => { - if (!props.readOnly) $emit('edit', true); + if (!props.readOnly) emit('edit', true); }; const onInputBlur = () => { - if (!isResizing.value) $emit('edit', false); + if (!isResizing.value) emit('edit', false); }; const onUpdateModelValue = (value: string) => { - $emit('update:modelValue', value); + emit('update:modelValue', value); }; const onMarkdownClick = (link: string, event: Event) => { - $emit('markdown-click', link, event); + emit('markdown-click', link, event); }; const onResize = (values: ResizeData) => { - $emit('resize', values); + emit('resize', values); }; const onResizeStart = () => { isResizing.value = true; - $emit('resizestart'); + emit('resizestart'); }; const onResizeEnd = () => { isResizing.value = false; - $emit('resizeend'); + emit('resizeend'); }; const onInputScroll = (event: WheelEvent) => { diff --git a/packages/design-system/src/components/N8nTabs/Tabs.vue b/packages/design-system/src/components/N8nTabs/Tabs.vue index 82a5825ed3..b964b7735d 100644 --- a/packages/design-system/src/components/N8nTabs/Tabs.vue +++ b/packages/design-system/src/components/N8nTabs/Tabs.vue @@ -111,8 +111,8 @@ onUnmounted(() => { }); const $emit = defineEmits<{ - (event: 'tooltipClick', tab: string, e: MouseEvent): void; - (event: 'update:modelValue', tab: string): void; + tooltipClick: [tab: string, e: MouseEvent]; + 'update:modelValue': [tab: string]; }>(); const handleTooltipClick = (tab: string, event: MouseEvent) => $emit('tooltipClick', tab, event); diff --git a/packages/design-system/src/components/N8nTags/Tags.vue b/packages/design-system/src/components/N8nTags/Tags.vue index 3c9f017ff2..d7179b3fa0 100644 --- a/packages/design-system/src/components/N8nTags/Tags.vue +++ b/packages/design-system/src/components/N8nTags/Tags.vue @@ -43,8 +43,8 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'expand', value: boolean): void; - (event: 'click:tag', tagId: string, e: MouseEvent): void; + expand: [value: boolean]; + 'click:tag': [tagId: string, e: MouseEvent]; }>(); const { t } = useI18n(); diff --git a/packages/design-system/src/components/N8nUserSelect/UserSelect.vue b/packages/design-system/src/components/N8nUserSelect/UserSelect.vue index 898c2a3a1c..6bef5cdfe9 100644 --- a/packages/design-system/src/components/N8nUserSelect/UserSelect.vue +++ b/packages/design-system/src/components/N8nUserSelect/UserSelect.vue @@ -55,8 +55,8 @@ const props = withDefaults(defineProps(), { }); const $emit = defineEmits<{ - (event: 'blur'): void; - (event: 'focus'): void; + blur: []; + focus: []; }>(); const { t } = useI18n(); diff --git a/packages/design-system/src/components/N8nUsersList/UsersList.vue b/packages/design-system/src/components/N8nUsersList/UsersList.vue index b098577fb4..9b1f54ebec 100644 --- a/packages/design-system/src/components/N8nUsersList/UsersList.vue +++ b/packages/design-system/src/components/N8nUsersList/UsersList.vue @@ -105,11 +105,11 @@ const getActions = (user: IUser): UserAction[] => { return props.actions.filter((action) => (action.guard ?? defaultGuard)(user)); }; -const $emit = defineEmits<{ - (event: 'action', _: { action: string; userId: string }): void; +const emit = defineEmits<{ + action: [value: { action: string; userId: string }]; }>(); const onUserAction = (user: IUser, action: string) => - $emit('action', { + emit('action', { action, userId: user.id, }); diff --git a/packages/editor-ui/src/components/AIAssistantChat/NextStepPopup.vue b/packages/editor-ui/src/components/AIAssistantChat/NextStepPopup.vue index 1b5c921217..e3baafc4c7 100644 --- a/packages/editor-ui/src/components/AIAssistantChat/NextStepPopup.vue +++ b/packages/editor-ui/src/components/AIAssistantChat/NextStepPopup.vue @@ -8,7 +8,7 @@ const aiStore = useAIStore(); const locale = useI18n(); const telemetry = useTelemetry(); -const emit = defineEmits<{ (event: 'optionSelected', option: string): void }>(); +const emit = defineEmits<{ optionSelected: [option: string] }>(); const aiAssistantChatOpen = computed(() => aiStore.assistantChatOpen); diff --git a/packages/editor-ui/src/components/AIAssistantChat/QuickReplies.vue b/packages/editor-ui/src/components/AIAssistantChat/QuickReplies.vue index 1a43f625d7..77a0519cd4 100644 --- a/packages/editor-ui/src/components/AIAssistantChat/QuickReplies.vue +++ b/packages/editor-ui/src/components/AIAssistantChat/QuickReplies.vue @@ -10,7 +10,7 @@ type QuickReply = { const locale = useI18n(); const emit = defineEmits<{ - (event: 'replySelected', value: QuickReply): void; + replySelected: [value: QuickReply]; }>(); defineProps<{ diff --git a/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue b/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue index c038ae07ab..41d87f3ff0 100644 --- a/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue +++ b/packages/editor-ui/src/components/AssignmentCollection/Assignment.vue @@ -26,8 +26,8 @@ const props = defineProps(); const assignment = ref(props.modelValue); const emit = defineEmits<{ - (event: 'update:model-value', value: AssignmentValue): void; - (event: 'remove'): void; + 'update:model-value': [value: AssignmentValue]; + remove: []; }>(); const ndvStore = useNDVStore(); diff --git a/packages/editor-ui/src/components/AssignmentCollection/AssignmentCollection.vue b/packages/editor-ui/src/components/AssignmentCollection/AssignmentCollection.vue index ed641a600f..fb13948302 100644 --- a/packages/editor-ui/src/components/AssignmentCollection/AssignmentCollection.vue +++ b/packages/editor-ui/src/components/AssignmentCollection/AssignmentCollection.vue @@ -27,10 +27,7 @@ interface Props { const props = withDefaults(defineProps(), { isReadOnly: false }); const emit = defineEmits<{ - ( - event: 'valueChanged', - value: { name: string; node: string; value: AssignmentCollectionValue }, - ): void; + valueChanged: [value: { name: string; node: string; value: AssignmentCollectionValue }]; }>(); const i18n = useI18n(); diff --git a/packages/editor-ui/src/components/AssignmentCollection/TypeSelect.vue b/packages/editor-ui/src/components/AssignmentCollection/TypeSelect.vue index 2a646a064f..f25b0f1f77 100644 --- a/packages/editor-ui/src/components/AssignmentCollection/TypeSelect.vue +++ b/packages/editor-ui/src/components/AssignmentCollection/TypeSelect.vue @@ -12,7 +12,7 @@ interface Props { const props = defineProps(); const emit = defineEmits<{ - (event: 'update:model-value', type: string): void; + 'update:model-value': [type: string]; }>(); const i18n = useI18n(); diff --git a/packages/editor-ui/src/components/BinaryDataDisplay.vue b/packages/editor-ui/src/components/BinaryDataDisplay.vue index c285fc9390..4f41d15a39 100644 --- a/packages/editor-ui/src/components/BinaryDataDisplay.vue +++ b/packages/editor-ui/src/components/BinaryDataDisplay.vue @@ -31,7 +31,7 @@ const props = defineProps<{ }>(); const emit = defineEmits<{ - (event: 'close'): void; + close: []; }>(); const nodeHelpers = useNodeHelpers(); diff --git a/packages/editor-ui/src/components/CodeNodeEditor/AskAI/AskAI.vue b/packages/editor-ui/src/components/CodeNodeEditor/AskAI/AskAI.vue index dfda2eccd6..95f8bba04c 100644 --- a/packages/editor-ui/src/components/CodeNodeEditor/AskAI/AskAI.vue +++ b/packages/editor-ui/src/components/CodeNodeEditor/AskAI/AskAI.vue @@ -28,10 +28,10 @@ import { } from '@/constants'; const emit = defineEmits<{ - (e: 'submit', code: string): void; - (e: 'replaceCode', code: string): void; - (e: 'startedLoading'): void; - (e: 'finishedLoading'): void; + submit: [code: string]; + replaceCode: [code: string]; + startedLoading: []; + finishedLoading: []; }>(); const props = defineProps<{ diff --git a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue index 6c23faf03a..d59a13e98e 100644 --- a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue +++ b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue @@ -94,7 +94,7 @@ const props = withDefaults(defineProps(), { rows: 4, }); const emit = defineEmits<{ - (event: 'update:modelValue', value: string): void; + 'update:modelValue': [value: string]; }>(); const message = useMessage(); diff --git a/packages/editor-ui/src/components/CollectionParameter.vue b/packages/editor-ui/src/components/CollectionParameter.vue index 37c5e3d75f..fb0d096598 100644 --- a/packages/editor-ui/src/components/CollectionParameter.vue +++ b/packages/editor-ui/src/components/CollectionParameter.vue @@ -76,8 +76,9 @@ export interface Props { isReadOnly?: boolean; } const emit = defineEmits<{ - (event: 'valueChanged', value: IUpdateInformation): void; + valueChanged: [value: IUpdateInformation]; }>(); + const props = defineProps(); const ndvStore = useNDVStore(); const i18n = useI18n(); diff --git a/packages/editor-ui/src/components/ContextMenu/ContextMenu.vue b/packages/editor-ui/src/components/ContextMenu/ContextMenu.vue index 2429ec766c..f8c8ed7a88 100644 --- a/packages/editor-ui/src/components/ContextMenu/ContextMenu.vue +++ b/packages/editor-ui/src/components/ContextMenu/ContextMenu.vue @@ -7,7 +7,7 @@ import { watch, ref } from 'vue'; const contextMenu = useContextMenu(); const { position, isOpen, actions, target } = contextMenu; const dropdown = ref>(); -const emit = defineEmits<{ (event: 'action', action: ContextMenuAction, nodes: INode[]): void }>(); +const emit = defineEmits<{ action: [action: ContextMenuAction, nodes: INode[]] }>(); watch( isOpen, diff --git a/packages/editor-ui/src/components/CopyInput.vue b/packages/editor-ui/src/components/CopyInput.vue index 080eb568e6..e25a37007d 100644 --- a/packages/editor-ui/src/components/CopyInput.vue +++ b/packages/editor-ui/src/components/CopyInput.vue @@ -48,7 +48,7 @@ const props = withDefaults(defineProps(), { toastTitle: useI18n().baseText('generic.copiedToClipboard'), }); const emit = defineEmits<{ - (event: 'copy'): void; + copy: []; }>(); const clipboard = useClipboard(); diff --git a/packages/editor-ui/src/components/CredentialEdit/AuthTypeSelector.vue b/packages/editor-ui/src/components/CredentialEdit/AuthTypeSelector.vue index 7c8654def0..cab337c2e5 100644 --- a/packages/editor-ui/src/components/CredentialEdit/AuthTypeSelector.vue +++ b/packages/editor-ui/src/components/CredentialEdit/AuthTypeSelector.vue @@ -22,7 +22,7 @@ export interface Props { } const emit = defineEmits<{ - (event: 'authTypeChanged', value: string): void; + authTypeChanged: [value: string]; }>(); const nodeTypesStore = useNodeTypesStore(); diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue index a2de471f7f..1bfda209de 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue @@ -215,11 +215,11 @@ const props = withDefaults(defineProps(), { credentialPermissions: () => ({}) as PermissionsMap, }); const emit = defineEmits<{ - (event: 'update', value: IUpdateInformation): void; - (event: 'authTypeChanged', value: string): void; - (event: 'scrollToTop'): void; - (event: 'retest'): void; - (event: 'oauth'): void; + update: [value: IUpdateInformation]; + authTypeChanged: [value: string]; + scrollToTop: []; + retest: []; + oauth: []; }>(); const credentialsStore = useCredentialsStore(); diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialInputs.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialInputs.vue index fcc2dd65cd..7ab0276c54 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialInputs.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialInputs.vue @@ -47,7 +47,7 @@ const credentialDataValues = computed( ); const emit = defineEmits<{ - (event: 'update', value: IUpdateInformation): void; + update: [value: IUpdateInformation]; }>(); function valueChanged(parameterData: IUpdateInformation) { diff --git a/packages/editor-ui/src/components/CredentialPicker/CredentialPicker.vue b/packages/editor-ui/src/components/CredentialPicker/CredentialPicker.vue index b7431eaa65..160e293655 100644 --- a/packages/editor-ui/src/components/CredentialPicker/CredentialPicker.vue +++ b/packages/editor-ui/src/components/CredentialPicker/CredentialPicker.vue @@ -14,9 +14,9 @@ const props = defineProps<{ }>(); const $emit = defineEmits<{ - (event: 'credentialSelected', credentialId: string): void; - (event: 'credentialDeselected'): void; - (event: 'credentialModalOpened'): void; + credentialSelected: [credentialId: string]; + credentialDeselected: []; + credentialModalOpened: []; }>(); const uiStore = useUIStore(); diff --git a/packages/editor-ui/src/components/CredentialPicker/CredentialsDropdown.vue b/packages/editor-ui/src/components/CredentialPicker/CredentialsDropdown.vue index da79d18ab8..a967ab3928 100644 --- a/packages/editor-ui/src/components/CredentialPicker/CredentialsDropdown.vue +++ b/packages/editor-ui/src/components/CredentialPicker/CredentialsDropdown.vue @@ -13,8 +13,8 @@ const props = defineProps<{ }>(); const $emit = defineEmits<{ - (event: 'credentialSelected', credentialId: string): void; - (event: 'newCredential'): void; + credentialSelected: [credentialId: string]; + newCredential: []; }>(); const i18n = useI18n(); diff --git a/packages/editor-ui/src/components/Draggable.vue b/packages/editor-ui/src/components/Draggable.vue index f91584d3cb..5adfaaf05a 100644 --- a/packages/editor-ui/src/components/Draggable.vue +++ b/packages/editor-ui/src/components/Draggable.vue @@ -30,10 +30,11 @@ type Props = { }; const props = withDefaults(defineProps(), { tag: 'div', disabled: false }); + const emit = defineEmits<{ - (event: 'drag', value: XYPosition): void; - (event: 'dragstart', value: HTMLElement): void; - (event: 'dragend', value: HTMLElement): void; + drag: [value: XYPosition]; + dragstart: [value: HTMLElement]; + dragend: [value: HTMLElement]; }>(); const isDragging = ref(false); diff --git a/packages/editor-ui/src/components/DraggableTarget.vue b/packages/editor-ui/src/components/DraggableTarget.vue index eb2ae92eeb..0dcadd856e 100644 --- a/packages/editor-ui/src/components/DraggableTarget.vue +++ b/packages/editor-ui/src/components/DraggableTarget.vue @@ -24,8 +24,9 @@ const props = withDefaults(defineProps(), { stickyOffset: () => [0, 0], stickyOrigin: 'top-left', }); + const emit = defineEmits<{ - (event: 'drop', value: string): void; + drop: [value: string]; }>(); const hovering = ref(false); diff --git a/packages/editor-ui/src/components/DropArea/DropArea.vue b/packages/editor-ui/src/components/DropArea/DropArea.vue index a6129983a7..8feffb7b4b 100644 --- a/packages/editor-ui/src/components/DropArea/DropArea.vue +++ b/packages/editor-ui/src/components/DropArea/DropArea.vue @@ -1,7 +1,7 @@ diff --git a/packages/editor-ui/src/views/MfaView.vue b/packages/editor-ui/src/views/MfaView.vue index 928789aea5..b4bbe14105 100644 --- a/packages/editor-ui/src/views/MfaView.vue +++ b/packages/editor-ui/src/views/MfaView.vue @@ -116,9 +116,9 @@ const i18 = useI18n(); // --------------------------------------------------------------------------- const emit = defineEmits<{ - (event: 'onFormChanged', formField: string): void; - (event: 'onBackClick', formField: string): void; - (event: 'submit', form: { token: string; recoveryCode: string }): void; + onFormChanged: [formField: string]; + onBackClick: [formField: string]; + submit: [{ token: string; recoveryCode: string }]; }>(); // #endregion diff --git a/packages/editor-ui/src/views/SetupWorkflowFromTemplateView/SetupTemplateFormStep.vue b/packages/editor-ui/src/views/SetupWorkflowFromTemplateView/SetupTemplateFormStep.vue index cd0114cdd3..2e64dece86 100644 --- a/packages/editor-ui/src/views/SetupWorkflowFromTemplateView/SetupTemplateFormStep.vue +++ b/packages/editor-ui/src/views/SetupWorkflowFromTemplateView/SetupTemplateFormStep.vue @@ -28,11 +28,8 @@ const props = withDefaults( ); const emit = defineEmits<{ - ( - e: 'credentialSelected', - event: { credentialUsageKey: TemplateCredentialKey; credentialId: string }, - ): void; - (e: 'credentialDeselected', event: { credentialUsageKey: TemplateCredentialKey }): void; + credentialSelected: [event: { credentialUsageKey: TemplateCredentialKey; credentialId: string }]; + credentialDeselected: [event: { credentialUsageKey: TemplateCredentialKey }]; }>(); // Stores