mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: fix linting issues
This commit is contained in:
parent
d8073efa94
commit
21624b7f40
|
@ -75,6 +75,7 @@ export default defineComponent({
|
|||
...useHistoryHelper(useRoute()),
|
||||
...useToast(),
|
||||
externalHooks: useExternalHooks(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...newVersions.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -43,7 +43,7 @@ export default defineComponent({
|
|||
},
|
||||
onResizeEnd() {
|
||||
this.width = window.innerWidth;
|
||||
this.$nextTick(async () => {
|
||||
void this.$nextTick(async () => {
|
||||
const bannerHeight = await getBannerRowHeight();
|
||||
useUIStore().updateBannersHeight(bannerHeight);
|
||||
});
|
||||
|
|
|
@ -99,7 +99,7 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
const sliderRef = this.$refs.slider as SliderRef | undefined;
|
||||
if (!sliderRef) {
|
||||
return;
|
||||
|
|
|
@ -89,7 +89,7 @@ export default defineComponent({
|
|||
},
|
||||
async mounted() {
|
||||
this.name = await this.workflowsStore.getDuplicateCurrentWorkflowName(this.data.name);
|
||||
this.$nextTick(() => this.focusOnNameInput());
|
||||
void this.$nextTick(() => this.focusOnNameInput());
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useCredentialsStore, useUsersStore, useSettingsStore, useWorkflowsStore),
|
||||
|
|
|
@ -194,7 +194,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
this.autoRefresh = this.uiStore.executionSidebarAutoRefresh === true;
|
||||
this.startAutoRefreshInterval();
|
||||
void this.startAutoRefreshInterval();
|
||||
document.addEventListener('visibilitychange', this.onDocumentVisibilityChange);
|
||||
|
||||
this.loading = false;
|
||||
|
@ -453,7 +453,7 @@ export default defineComponent({
|
|||
return [];
|
||||
}
|
||||
try {
|
||||
return this.workflowsStore.loadCurrentWorkflowExecutions(this.requestFilter);
|
||||
return await this.workflowsStore.loadCurrentWorkflowExecutions(this.requestFilter);
|
||||
} catch (error) {
|
||||
if (error.errorCode === NO_NETWORK_ERROR_CODE) {
|
||||
this.showMessage(
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<template>
|
||||
<slot />
|
||||
</template>
|
|
@ -27,7 +27,7 @@ export default defineComponent({
|
|||
return;
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
this.eventBus.emit('observe', this.$refs.observed);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -41,7 +41,9 @@ export default defineComponent({
|
|||
mixins: [pushConnection, workflowHelpers],
|
||||
setup(props) {
|
||||
return {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...pushConnection.setup?.(props),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowHelpers.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -138,6 +138,7 @@ export default defineComponent({
|
|||
setup(props) {
|
||||
return {
|
||||
...useMessage(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowRun.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -576,7 +576,7 @@ export default defineComponent({
|
|||
workflow_id: this.workflowsStore.workflowId,
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
// Wait a tick else vue causes problems because the data is gone
|
||||
this.$emit('removeNode', this.data.name);
|
||||
});
|
||||
|
@ -587,7 +587,7 @@ export default defineComponent({
|
|||
button_name: 'duplicate',
|
||||
workflow_id: this.workflowsStore.workflowId,
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
// Wait a tick else vue causes problems because the data is gone
|
||||
this.$emit('duplicateNode', this.data.name);
|
||||
});
|
||||
|
|
|
@ -125,7 +125,7 @@ watch(
|
|||
:data-keyboard-nav-id="item.uuid"
|
||||
@click="wrappedEmit('selected', item)"
|
||||
>
|
||||
<Fragment v-if="renderedItems.includes(item)">
|
||||
<div v-if="renderedItems.includes(item)">
|
||||
<label-item v-if="item.type === 'label'" :item="item" />
|
||||
<subcategory-item v-if="item.type === 'subcategory'" :item="item.properties" />
|
||||
|
||||
|
@ -148,7 +148,7 @@ watch(
|
|||
:view="item.properties"
|
||||
:class="$style.viewItem"
|
||||
/>
|
||||
</Fragment>
|
||||
</div>
|
||||
|
||||
<n8n-loading :loading="true" :rows="1" variant="p" :class="$style.itemSkeleton" v-else />
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { defineComponent, nextTick, watch } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import { render, screen, fireEvent } from '@testing-library/vue';
|
||||
import { screen, fireEvent } from '@testing-library/vue';
|
||||
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||
import { useNodeCreatorStore } from '@/stores/nodeCreator.store';
|
||||
import { mockSimplifiedNodeType } from './utils';
|
||||
|
|
|
@ -2,7 +2,6 @@ import userEvent from '@testing-library/user-event';
|
|||
import { defineComponent, computed } from 'vue';
|
||||
import { useKeyboardNavigation } from '../composables/useKeyboardNavigation';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
const eventHookSpy = vi.fn();
|
||||
|
|
|
@ -192,6 +192,7 @@ export default defineComponent({
|
|||
return {
|
||||
...useDeviceSupport(),
|
||||
...useMessage(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowActivate.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -64,6 +64,7 @@ export default defineComponent({
|
|||
return {
|
||||
...useToast(),
|
||||
...useMessage(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowRun.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -74,7 +74,7 @@ export default defineComponent({
|
|||
onEdit() {
|
||||
this.newName = this.modelValue;
|
||||
this.editName = true;
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
const inputRef = this.$refs.input as HTMLInputElement | undefined;
|
||||
if (inputRef) {
|
||||
inputRef.focus();
|
||||
|
|
|
@ -991,7 +991,7 @@ export default defineComponent({
|
|||
this.nodeName = this.node.name;
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
// @ts-ignore
|
||||
if (this.$refs.inputField?.focus && this.$refs.inputField?.$el) {
|
||||
// @ts-ignore
|
||||
|
@ -1162,7 +1162,7 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
const remoteParameterOptions = this.$el.querySelectorAll('.remote-parameter-option');
|
||||
|
||||
if (remoteParameterOptions.length > 0) {
|
||||
|
|
|
@ -378,7 +378,7 @@ export default defineComponent({
|
|||
|
||||
if (newDestination) {
|
||||
this.headerLabel = newDestination?.label ?? this.headerLabel;
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
this.setupNode(newDestination);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
deleteNode() {
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
// Wait a tick else vue causes problems because the data is gone
|
||||
this.$emit('removeNode', this.data.name);
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ export default defineComponent({
|
|||
watch: {
|
||||
dialogVisible() {
|
||||
if (this.dialogVisible === true) {
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
(this.$refs.inputField as HTMLInputElement).focus();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ const valueValidationRules: Array<Rule | RuleGroup> = [
|
|||
watch(
|
||||
() => modelValue.value.key,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
if (formValidationStatus.value.key) {
|
||||
updateUsageSyntax();
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ export default defineComponent({
|
|||
setup(props) {
|
||||
return {
|
||||
...useToast(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowActivate.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
|
|
@ -9,7 +9,8 @@ import { createTestingPinia } from '@pinia/testing';
|
|||
import BannerStack from '@/components/banners/BannerStack.vue';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createComponentRenderer, RenderOptions } from '@/__tests__/render';
|
||||
import type { RenderOptions } from '@/__tests__/render';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
let uiStore: ReturnType<typeof useUIStore>;
|
||||
let usersStore: ReturnType<typeof useUsersStore>;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { PiniaVuePlugin } from 'pinia';
|
||||
import { render } from '@testing-library/vue';
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
|
|
|
@ -9,7 +9,6 @@ import { createComponentRenderer } from '@/__tests__/render';
|
|||
import * as telemetryModule from '@/composables/useTelemetry';
|
||||
import type { Telemetry } from '@/plugins/telemetry';
|
||||
import { merge } from 'lodash-es';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const defaultFilterState: ExecutionFilterType = {
|
||||
status: 'all',
|
||||
|
|
|
@ -9,7 +9,8 @@ import type { IWorkflowDb } from '@/Interface';
|
|||
import type { IExecutionsSummary } from 'n8n-workflow';
|
||||
import { retry, SETTINGS_STORE_DEFAULT_STATE, waitAllPromises } from '@/__tests__/utils';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { RenderOptions, createComponentRenderer } from '@/__tests__/render';
|
||||
import type { RenderOptions } from '@/__tests__/render';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
let pinia: ReturnType<typeof createTestingPinia>;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import { PERSONALIZATION_MODAL_KEY, STORES } from '@/constants';
|
|||
import { retry } from '@/__tests__/utils';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { fireEvent } from '@testing-library/vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const renderComponent = createComponentRenderer(PersonalizationModal, {
|
||||
props: {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { render, within } from '@testing-library/vue';
|
||||
import { within } from '@testing-library/vue';
|
||||
import {
|
||||
DEFAULT_SETUP,
|
||||
MAPPING_COLUMNS_RESPONSE,
|
||||
|
|
|
@ -1,26 +1,12 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import { waitFor } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { merge } from 'lodash-es';
|
||||
import RunData from '@/components/RunData.vue';
|
||||
import { STORES, VIEWS } from '@/constants';
|
||||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import { useNDVStore, useWorkflowsStore } from '@/stores';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
let pinia: ReturnType<typeof createTestingPinia>;
|
||||
let ssoStore: ReturnType<typeof useSSOStore>;
|
||||
let workflowsStore: ReturnType<typeof useWorkflowsStore>;
|
||||
let ndvStore: ReturnType<typeof useNDVStore>;
|
||||
|
||||
// const nodeHelpers = defineComponent({
|
||||
// methods: {
|
||||
// getNodeInputData: vi.fn().mockReturnValue(),
|
||||
// },
|
||||
// });
|
||||
|
||||
const renderComponent = createComponentRenderer(RunData, {
|
||||
props: {
|
||||
nodeUi: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { render, cleanup } from '@testing-library/vue';
|
||||
import { cleanup } from '@testing-library/vue';
|
||||
import RunDataJsonSchema from '@/components/RunDataSchema.vue';
|
||||
import { STORES } from '@/constants';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
|
|
@ -5,9 +5,6 @@ import { createTestingPinia } from '@pinia/testing';
|
|||
import SqlEditor from '@/components/SqlEditor/SqlEditor.vue';
|
||||
import { expressionManager } from '@/mixins/expressionManager';
|
||||
import type { TargetItem } from '@/Interface';
|
||||
import { N8nPlugin } from 'n8n-design-system/plugin';
|
||||
import { PiniaVuePlugin } from 'pinia';
|
||||
import { GlobalDirectivesPlugin } from '@/plugins/directives';
|
||||
import { renderComponent } from '@/__tests__/render';
|
||||
|
||||
const EXPRESSION_OUTPUT_TEST_ID = 'inline-expression-editor-output';
|
||||
|
|
|
@ -394,7 +394,7 @@ export default defineComponent({
|
|||
await this.initialize();
|
||||
|
||||
this.loading = false;
|
||||
this.$nextTick(this.focusSearchInput);
|
||||
void this.$nextTick(this.focusSearchInput);
|
||||
},
|
||||
setCurrentPage(page: number) {
|
||||
this.currentPage = page;
|
||||
|
|
|
@ -7,14 +7,12 @@ import { ElLoading, ElMessageBox } from 'element-plus';
|
|||
import { N8nPlugin } from 'n8n-design-system';
|
||||
import { useMessage } from '@/composables/useMessage';
|
||||
import EnterpriseEdition from '@/components/EnterpriseEdition.ee.vue';
|
||||
import Fragment from '@/components/Fragment.vue';
|
||||
|
||||
export const GlobalComponentsPlugin: Plugin<{}> = {
|
||||
install(app) {
|
||||
const messageService = useMessage();
|
||||
|
||||
app.component('enterprise-edition', EnterpriseEdition);
|
||||
app.component('Fragment', Fragment);
|
||||
|
||||
app.use(ElementPlus);
|
||||
app.use(N8nPlugin);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { beforeAll } from 'vitest';
|
||||
import { setActivePinia, createPinia } from 'pinia';
|
||||
import { setActivePinia } from 'pinia';
|
||||
import { merge } from 'lodash-es';
|
||||
import { isAuthorized, ROLE } from '@/utils';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import type { IUser } from '@/Interface';
|
||||
import { VIEWS } from '@/constants';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import type { IN8nUISettings } from 'n8n-workflow';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
|
|
@ -354,6 +354,7 @@ export default defineComponent({
|
|||
...useToast(),
|
||||
...useMessage(),
|
||||
...useUniqueNodeName(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...workflowRun.setup?.(props),
|
||||
};
|
||||
},
|
||||
|
@ -452,7 +453,7 @@ export default defineComponent({
|
|||
if (from.name === VIEWS.NEW_WORKFLOW) {
|
||||
// Replace the current route with the new workflow route
|
||||
// before navigating to the new route when saving new workflow.
|
||||
this.$router.replace(
|
||||
await this.$router.replace(
|
||||
{ name: VIEWS.WORKFLOW, params: { name: this.currentWorkflow } },
|
||||
() => {
|
||||
// We can't use next() here since vue-router
|
||||
|
@ -764,7 +765,7 @@ export default defineComponent({
|
|||
deepCopy(data.workflowData.nodes),
|
||||
deepCopy(data.workflowData.connections),
|
||||
);
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
this.canvasStore.zoomToFit();
|
||||
this.uiStore.stateIsDirty = false;
|
||||
});
|
||||
|
@ -835,7 +836,7 @@ export default defineComponent({
|
|||
this.workflowsStore.setWorkflowPinData(data.workflow.pinData);
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
this.canvasStore.zoomToFit();
|
||||
});
|
||||
},
|
||||
|
@ -878,7 +879,7 @@ export default defineComponent({
|
|||
|
||||
await this.addNodes(data.workflow.nodes, data.workflow.connections);
|
||||
this.workflowData = (await this.workflowsStore.getNewWorkflowData(data.name)) || {};
|
||||
this.$nextTick(() => {
|
||||
void this.$nextTick(() => {
|
||||
this.canvasStore.zoomToFit();
|
||||
this.uiStore.stateIsDirty = true;
|
||||
});
|
||||
|
@ -3748,7 +3749,7 @@ export default defineComponent({
|
|||
const lastAddedNode = this.nodes[this.nodes.length - 1];
|
||||
const previouslyAddedNode = this.nodes[this.nodes.length - 2];
|
||||
|
||||
this.$nextTick(() =>
|
||||
void this.$nextTick(() =>
|
||||
this.connectTwoNodes(previouslyAddedNode.name, 0, lastAddedNode.name, 0),
|
||||
);
|
||||
|
||||
|
|
|
@ -76,10 +76,11 @@ export default defineComponent({
|
|||
components: {
|
||||
CommunityPackageCard,
|
||||
},
|
||||
setup(props) {
|
||||
setup(props, ctx) {
|
||||
return {
|
||||
...useToast(),
|
||||
...pushConnection.setup?.(props),
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
...pushConnection.setup?.(props, ctx),
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import { PiniaVuePlugin } from 'pinia';
|
||||
import { render } from '@testing-library/vue';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { merge } from 'lodash-es';
|
||||
import AuthView from '@/views/AuthView.vue';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { PiniaVuePlugin } from 'pinia';
|
||||
import { render } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
@ -8,7 +6,6 @@ import SamlOnboarding from '@/views/SamlOnboarding.vue';
|
|||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import { STORES } from '@/constants';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE, waitAllPromises } from '@/__tests__/utils';
|
||||
import { i18nInstance } from '@/plugins/i18n';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
vi.mock('vue-router', () => {
|
||||
|
|
|
@ -6,9 +6,6 @@ import { useSettingsStore } from '@/stores';
|
|||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { setupServer } from '@/__tests__/server';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import { UserManagementAuthenticationMethod } from '@/Interface';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
let pinia: ReturnType<typeof createPinia>;
|
||||
let settingsStore: ReturnType<typeof useSettingsStore>;
|
||||
|
|
Loading…
Reference in a new issue