refactor: Run lintfix (no-changelog) (#7537)
- Fix autofixable violations - Remove unused directives - Allow for PascalCased variables - needed for dynamically imported or assigned classes, decorators, routers, etc.
This commit is contained in:
@@ -15,7 +15,7 @@ export const copyPaste = defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.copyPasteElementsGotCreated === true) {
|
||||
if (this.copyPasteElementsGotCreated) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ export const copyPaste = defineComponent({
|
||||
// Check if the event got emitted from a message box or from something
|
||||
// else which should ignore the copy/paste
|
||||
// @ts-ignore
|
||||
const path = e.path || (e.composedPath && e.composedPath());
|
||||
const path = e.path || e.composedPath?.();
|
||||
for (let index = 0; index < path.length; index++) {
|
||||
if (
|
||||
path[index].className &&
|
||||
|
||||
@@ -30,7 +30,7 @@ export const moveNodeWorkflow = defineComponent({
|
||||
this.moveLastPosition[1] = y;
|
||||
},
|
||||
mouseDownMoveWorkflow(e: MouseEvent, moveButtonPressed: boolean) {
|
||||
if (this.isCtrlKeyPressed(e) === false && !moveButtonPressed) {
|
||||
if (!this.isCtrlKeyPressed(e) && !moveButtonPressed) {
|
||||
// We only care about it when the ctrl key is pressed at the same time.
|
||||
// So we exit when it is not pressed.
|
||||
return;
|
||||
@@ -55,7 +55,7 @@ export const moveNodeWorkflow = defineComponent({
|
||||
this.$el.addEventListener('mousemove', this.mouseMoveNodeWorkflow);
|
||||
},
|
||||
mouseUpMoveWorkflow(e: MouseEvent) {
|
||||
if (this.uiStore.nodeViewMoveInProgress === false) {
|
||||
if (!this.uiStore.nodeViewMoveInProgress) {
|
||||
// If it is not active return directly.
|
||||
// Else normal node dragging will not work.
|
||||
return;
|
||||
|
||||
@@ -284,7 +284,7 @@ export const pushConnection = defineComponent({
|
||||
// The workflow finished executing
|
||||
let pushData: IPushDataExecutionFinished;
|
||||
if (receivedData.type === 'executionRecovered' && recoveredPushData !== undefined) {
|
||||
pushData = recoveredPushData as IPushDataExecutionFinished;
|
||||
pushData = recoveredPushData;
|
||||
} else {
|
||||
pushData = receivedData.data as IPushDataExecutionFinished;
|
||||
}
|
||||
@@ -329,12 +329,7 @@ export const pushConnection = defineComponent({
|
||||
);
|
||||
}
|
||||
|
||||
const lineNumber =
|
||||
runDataExecuted &&
|
||||
runDataExecuted.data &&
|
||||
runDataExecuted.data.resultData &&
|
||||
runDataExecuted.data.resultData.error &&
|
||||
runDataExecuted.data.resultData.error.lineNumber;
|
||||
const lineNumber = runDataExecuted?.data?.resultData?.error?.lineNumber;
|
||||
|
||||
codeNodeEditorEventBus.emit('error-line-number', lineNumber || 'final');
|
||||
|
||||
@@ -449,16 +444,13 @@ export const pushConnection = defineComponent({
|
||||
this.titleSet(workflow.name as string, 'IDLE');
|
||||
|
||||
const execution = this.workflowsStore.getWorkflowExecution;
|
||||
if (execution && execution.executedNode) {
|
||||
if (execution?.executedNode) {
|
||||
const node = this.workflowsStore.getNodeByName(execution.executedNode);
|
||||
const nodeType = node && this.nodeTypesStore.getNodeType(node.type, node.typeVersion);
|
||||
const nodeOutput =
|
||||
execution &&
|
||||
execution.executedNode &&
|
||||
execution.data &&
|
||||
execution.data.resultData &&
|
||||
execution.data.resultData.runData &&
|
||||
execution.data.resultData.runData[execution.executedNode];
|
||||
execution.data?.resultData?.runData?.[execution.executedNode];
|
||||
if (nodeType && nodeType.polling && !nodeOutput) {
|
||||
this.showMessage({
|
||||
title: this.$locale.baseText('pushConnection.pollingNode.dataNotFound', {
|
||||
@@ -507,12 +499,11 @@ export const pushConnection = defineComponent({
|
||||
let itemsCount = 0;
|
||||
if (
|
||||
lastNodeExecuted &&
|
||||
runDataExecuted.data.resultData.runData[lastNodeExecuted as string] &&
|
||||
runDataExecuted.data.resultData.runData[lastNodeExecuted] &&
|
||||
!runDataExecutedErrorMessage
|
||||
) {
|
||||
itemsCount =
|
||||
runDataExecuted.data.resultData.runData[lastNodeExecuted as string][0].data!.main[0]!
|
||||
.length;
|
||||
runDataExecuted.data.resultData.runData[lastNodeExecuted][0].data!.main[0]!.length;
|
||||
}
|
||||
|
||||
void this.$externalHooks().run('pushConnection.executionFinished', {
|
||||
@@ -596,7 +587,7 @@ export const pushConnection = defineComponent({
|
||||
interpolate: { error: '!' },
|
||||
});
|
||||
|
||||
if (error && error.message) {
|
||||
if (error?.message) {
|
||||
let nodeName: string | undefined;
|
||||
if ('node' in error) {
|
||||
nodeName = typeof error.node === 'string' ? error.node : error.node!.name;
|
||||
|
||||
@@ -17,7 +17,7 @@ export const userHelpers = defineComponent({
|
||||
},
|
||||
|
||||
canUserAccessRoute(route: RouteLocation): boolean {
|
||||
const permissions: IPermissions = route.meta && route.meta.permissions;
|
||||
const permissions: IPermissions = route.meta?.permissions;
|
||||
const usersStore = useUsersStore();
|
||||
const currentUser = usersStore.currentUser;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export const workflowActivate = defineComponent({
|
||||
telemetrySource?: string,
|
||||
) {
|
||||
this.updatingWorkflowActivation = true;
|
||||
const nodesIssuesExist = this.workflowsStore.nodesIssuesExist as boolean;
|
||||
const nodesIssuesExist = this.workflowsStore.nodesIssuesExist;
|
||||
|
||||
let currWorkflowId: string | undefined = workflowId;
|
||||
if (!currWorkflowId || currWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {
|
||||
@@ -49,7 +49,7 @@ export const workflowActivate = defineComponent({
|
||||
this.updatingWorkflowActivation = false;
|
||||
return;
|
||||
}
|
||||
currWorkflowId = this.workflowsStore.workflowId as string;
|
||||
currWorkflowId = this.workflowsStore.workflowId;
|
||||
}
|
||||
const isCurrentWorkflow = currWorkflowId === this.workflowsStore.workflowId;
|
||||
|
||||
@@ -76,7 +76,7 @@ export const workflowActivate = defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCurrentWorkflow && nodesIssuesExist && newActiveState === true) {
|
||||
if (isCurrentWorkflow && nodesIssuesExist && newActiveState) {
|
||||
this.showMessage({
|
||||
title: this.$locale.baseText(
|
||||
'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title',
|
||||
@@ -96,7 +96,7 @@ export const workflowActivate = defineComponent({
|
||||
!this.uiStore.stateIsDirty,
|
||||
);
|
||||
} catch (error) {
|
||||
const newStateName = newActiveState === true ? 'activated' : 'deactivated';
|
||||
const newStateName = newActiveState ? 'activated' : 'deactivated';
|
||||
this.showError(
|
||||
error,
|
||||
this.$locale.baseText('workflowActivator.showError.title', {
|
||||
|
||||
Reference in New Issue
Block a user