fix: Set '@typescript-eslint/return-await' rule to 'always' for FE (no-changelog) (#8373)
This commit is contained in:
@@ -65,7 +65,9 @@ import { get } from 'lodash-es';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
const ParameterInputList = defineAsyncComponent(async () => import('./ParameterInputList.vue'));
|
||||
const ParameterInputList = defineAsyncComponent(
|
||||
async () => await import('./ParameterInputList.vue'),
|
||||
);
|
||||
|
||||
const selectedOption = ref<string | undefined>(undefined);
|
||||
export interface Props {
|
||||
|
||||
@@ -136,7 +136,9 @@ import { deepCopy, isINodePropertyCollectionList } from 'n8n-workflow';
|
||||
|
||||
import { get } from 'lodash-es';
|
||||
|
||||
const ParameterInputList = defineAsyncComponent(async () => import('./ParameterInputList.vue'));
|
||||
const ParameterInputList = defineAsyncComponent(
|
||||
async () => await import('./ParameterInputList.vue'),
|
||||
);
|
||||
|
||||
export default defineComponent({
|
||||
name: 'FixedCollectionParameter',
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const NodeCreator = defineAsyncComponent(
|
||||
async () => import('@/components/Node/NodeCreator/NodeCreator.vue'),
|
||||
async () => await import('@/components/Node/NodeCreator/NodeCreator.vue'),
|
||||
);
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useKeyboardNavigation = defineStore('nodeCreatorKeyboardNavigation'
|
||||
return element?.getAttribute(KEYBOARD_ID_ATTR) || undefined;
|
||||
}
|
||||
async function refreshSelectableItems(): Promise<void> {
|
||||
return new Promise((resolve) => {
|
||||
return await new Promise((resolve) => {
|
||||
// Wait for DOM to update
|
||||
cleanupSelectableItems();
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -172,9 +172,11 @@ import { get, set } from 'lodash-es';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
|
||||
const FixedCollectionParameter = defineAsyncComponent(
|
||||
async () => import('./FixedCollectionParameter.vue'),
|
||||
async () => await import('./FixedCollectionParameter.vue'),
|
||||
);
|
||||
const CollectionParameter = defineAsyncComponent(
|
||||
async () => await import('./CollectionParameter.vue'),
|
||||
);
|
||||
const CollectionParameter = defineAsyncComponent(async () => import('./CollectionParameter.vue'));
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ParameterInputList',
|
||||
|
||||
@@ -622,11 +622,17 @@ import { isObject } from 'lodash-es';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
|
||||
const RunDataTable = defineAsyncComponent(async () => import('@/components/RunDataTable.vue'));
|
||||
const RunDataJson = defineAsyncComponent(async () => import('@/components/RunDataJson.vue'));
|
||||
const RunDataSchema = defineAsyncComponent(async () => import('@/components/RunDataSchema.vue'));
|
||||
const RunDataHtml = defineAsyncComponent(async () => import('@/components/RunDataHtml.vue'));
|
||||
const RunDataSearch = defineAsyncComponent(async () => import('@/components/RunDataSearch.vue'));
|
||||
const RunDataTable = defineAsyncComponent(
|
||||
async () => await import('@/components/RunDataTable.vue'),
|
||||
);
|
||||
const RunDataJson = defineAsyncComponent(async () => await import('@/components/RunDataJson.vue'));
|
||||
const RunDataSchema = defineAsyncComponent(
|
||||
async () => await import('@/components/RunDataSchema.vue'),
|
||||
);
|
||||
const RunDataHtml = defineAsyncComponent(async () => await import('@/components/RunDataHtml.vue'));
|
||||
const RunDataSearch = defineAsyncComponent(
|
||||
async () => await import('@/components/RunDataSearch.vue'),
|
||||
);
|
||||
|
||||
export type EnterEditModeArgs = {
|
||||
origin: 'editIconButton' | 'insertTestDataLink';
|
||||
@@ -1399,7 +1405,7 @@ export default defineComponent({
|
||||
return;
|
||||
} else {
|
||||
const bufferString = 'data:' + mimeType + ';base64,' + data;
|
||||
const blob = await fetch(bufferString).then(async (d) => d.blob());
|
||||
const blob = await fetch(bufferString).then(async (d) => await d.blob());
|
||||
saveAs(blob, fileName);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import TextWithHighlights from './TextWithHighlights.vue';
|
||||
|
||||
const RunDataJsonActions = defineAsyncComponent(
|
||||
async () => import('@/components/RunDataJsonActions.vue'),
|
||||
async () => await import('@/components/RunDataJsonActions.vue'),
|
||||
);
|
||||
|
||||
export default defineComponent({
|
||||
|
||||
@@ -106,7 +106,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
async activeChanged(newActiveState: boolean) {
|
||||
return this.updateWorkflowActivation(this.workflowId, newActiveState);
|
||||
return await this.updateWorkflowActivation(this.workflowId, newActiveState);
|
||||
},
|
||||
async displayActivationError() {
|
||||
let errorMessage: string;
|
||||
|
||||
@@ -150,7 +150,9 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import MessageTyping from '@n8n/chat/components/MessageTyping.vue';
|
||||
|
||||
const RunDataAi = defineAsyncComponent(async () => import('@/components/RunDataAi/RunDataAi.vue'));
|
||||
const RunDataAi = defineAsyncComponent(
|
||||
async () => await import('@/components/RunDataAi/RunDataAi.vue'),
|
||||
);
|
||||
|
||||
interface ChatMessage {
|
||||
text: string;
|
||||
|
||||
@@ -272,7 +272,7 @@ export default defineComponent({
|
||||
this.loading = true;
|
||||
|
||||
const saveWorkflowPromise = async () => {
|
||||
return new Promise<string>((resolve) => {
|
||||
return await new Promise<string>((resolve) => {
|
||||
if (this.workflow.id === PLACEHOLDER_EMPTY_WORKFLOW_ID) {
|
||||
nodeViewEventBus.emit('saveWorkflow', () => {
|
||||
resolve(this.workflow.id);
|
||||
@@ -439,7 +439,7 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
if (shouldSave === MODAL_CONFIRM) {
|
||||
return this.onSave();
|
||||
return await this.onSave();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user