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:
@@ -16,7 +16,7 @@ type Props = {
|
||||
createNodeActive?: boolean;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const NodeCreator = defineAsyncComponent(
|
||||
async () => import('@/components/Node/NodeCreator/NodeCreator.vue'),
|
||||
);
|
||||
|
||||
@@ -104,7 +104,7 @@ const containsAPIAction = computed(() => {
|
||||
return ((p as ActionCreateElement).properties.actionKey ?? '') === CUSTOM_API_CALL_KEY;
|
||||
});
|
||||
|
||||
return result === true;
|
||||
return result;
|
||||
});
|
||||
|
||||
const isTriggerRootView = computed(() => rootView.value === TRIGGER_NODE_CREATOR_VIEW);
|
||||
|
||||
@@ -110,7 +110,7 @@ function onDrop(event: DragEvent) {
|
||||
watch(
|
||||
() => props.active,
|
||||
(isActive) => {
|
||||
if (isActive === false) {
|
||||
if (!isActive) {
|
||||
setShowScrim(false);
|
||||
resetViewStacks();
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ import {
|
||||
mockSubcategoryCreateElement,
|
||||
mockLabelCreateElement,
|
||||
mockNodeCreateElement,
|
||||
mockActionCreateElement,
|
||||
mockViewCreateElement,
|
||||
} from './utils';
|
||||
import ItemsRenderer from '../Renderers/ItemsRenderer.vue';
|
||||
import { mockActionCreateElement } from './utils';
|
||||
import { mockViewCreateElement } from './utils';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
|
||||
const renderComponent = createComponentRenderer(ItemsRenderer);
|
||||
|
||||
@@ -145,7 +145,7 @@ export const useActions = () => {
|
||||
|
||||
return {
|
||||
name: actionItem.displayName,
|
||||
key: actionItem.name as string,
|
||||
key: actionItem.name,
|
||||
value: { ...actionItem.values, ...displayConditions } as INodeParameters,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ function operationsCategory(nodeTypeDescription: INodeTypeDescription): ActionTy
|
||||
(property) => property.name?.toLowerCase() === 'operation',
|
||||
);
|
||||
|
||||
if (!matchedProperty || !matchedProperty.options) return [];
|
||||
if (!matchedProperty?.options) return [];
|
||||
|
||||
const filteredOutItems = (matchedProperty.options as INodePropertyOptions[]).filter(
|
||||
(categoryItem: INodePropertyOptions) => !['*', '', ' '].includes(categoryItem.name),
|
||||
@@ -104,7 +104,7 @@ function triggersCategory(nodeTypeDescription: INodeTypeDescription): ActionType
|
||||
|
||||
// Inject placeholder action if no events are available
|
||||
// so user is able to add node to the canvas from the actions panel
|
||||
if (!matchedProperty || !matchedProperty.options) {
|
||||
if (!matchedProperty?.options) {
|
||||
return [
|
||||
{
|
||||
...getNodeTypeBase(nodeTypeDescription),
|
||||
@@ -191,7 +191,7 @@ function resourceCategories(nodeTypeDescription: INodeTypeDescription): ActionTy
|
||||
// We need to manually populate displayOptions as they are not present in the node description
|
||||
// if the resource has only one option
|
||||
const displayOptions = isSingleResource
|
||||
? { show: { resource: [(options as INodePropertyOptions[])[0]?.value] } }
|
||||
? { show: { resource: [options[0]?.value] } }
|
||||
: operations?.displayOptions;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user