Skip to content

Commit

Permalink
test(lint): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Jan 30, 2024
1 parent c88c8f9 commit 8c6ed08
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/app/components/factory/FactoryField.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Dropdown, vTooltip } from 'floating-vue'
import { Dropdown } from 'floating-vue'
import type { ResourceFactoryField, ResourceSchemaType } from '@moquerie/core'
import { isAnyOpen } from '../resource/resourceInstanceValueOverlays.js'
import type { FlatField } from './formTypes.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/app/components/factory/FactoryFieldInput.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { ResourceFactoryField, ResourceSchemaField, ResourceSchemaType } from '@moquerie/core'
import type { ResourceFactoryField, ResourceSchemaType } from '@moquerie/core'
import type { FlatField } from './formTypes.js'
const props = defineProps<{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Dropdown, Menu, Tooltip, vTooltip } from 'floating-vue'
import { Dropdown, Menu, Tooltip } from 'floating-vue'
import type { ResourceSchemaField, ResourceSchemaType } from '@moquerie/core'
// @TODO Handle required/non-null fields
Expand Down
4 changes: 2 additions & 2 deletions packages/app/components/resource/ResourceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ defineShortcuts({
/>
</template>

<template #default="{ item, ...props }">
<template #default="{ item, ...slotProps }">
<ResourceListItem
:resource-type="item"
:route-name="routeName"
v-bind="props"
v-bind="slotProps"
@click="$emit('update:resourceName', item.name)"
>
<template #trailing>
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/factory/execute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { faker } from '@faker-js/faker'
import { raw } from 'express'
import type { ResourceFactory, ResourceFactoryContext, ResourceFactoryFn } from '../types/factory.js'
import { getResolvedContext } from '../context.js'
import type { Awaitable } from '../util/types.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/factory/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default defineFactory({}, () => ({}))`)
return args
}

function generateAstField(fieldName: string, field: ResourceFactoryField, parentField: ResourceFactoryField | null): namedTypes.CallExpression | namedTypes.ObjectExpression | namedTypes.Identifier | namedTypes.Literal | namedTypes.ArrayExpression | namedTypes.ArrowFunctionExpression {
function generateAstField(fieldName: string, field: ResourceFactoryField, _parentField: ResourceFactoryField | null): namedTypes.CallExpression | namedTypes.ObjectExpression | namedTypes.Identifier | namedTypes.Literal | namedTypes.ArrayExpression | namedTypes.ArrowFunctionExpression {
let resultAst: any
if (field.type === 'faker') {
if (!field.fakerFn) {
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/resource/queryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ interface SerializeContext {

/**
* Create or update referenced resource instances.
* @param resourceName Name of the resource type.
* @param valueId Id of object, should correspond to the idFields of the resource type.
* @param data Object to serialize.
* @param serializeContext Context used to prevent infinite recursion.
* @param createOptions Options used to create the resource instance.
*/
async function serializeInstanceValue<TType extends ResourceSchemaType>(
resourceName: string,
Expand Down

0 comments on commit 8c6ed08

Please sign in to comment.