Lint
This commit is contained in:
parent
1c4fc21870
commit
4b0e389526
|
@ -53,7 +53,8 @@
|
||||||
"ignoreRestSiblings": true
|
"ignoreRestSiblings": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"local-rules/no-budibase-imports": "error"
|
"no-redeclare": "off",
|
||||||
|
"@typescript-eslint/no-redeclare": "error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ export async function processInputBBReferences<
|
||||||
subtype?: TS
|
subtype?: TS
|
||||||
): Promise<string | string[] | null> {
|
): Promise<string | string[] | null> {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FieldType.BB_REFERENCE:
|
case FieldType.BB_REFERENCE: {
|
||||||
let referenceIds: string[] = []
|
let referenceIds: string[] = []
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
|
@ -95,7 +95,7 @@ export async function processInputBBReferences<
|
||||||
default:
|
default:
|
||||||
throw utils.unreachable(subtype)
|
throw utils.unreachable(subtype)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case FieldType.BB_REFERENCE_SINGLE: {
|
case FieldType.BB_REFERENCE_SINGLE: {
|
||||||
if (value && Array.isArray(value)) {
|
if (value && Array.isArray(value)) {
|
||||||
throw "BB_REFERENCE_SINGLE cannot be an array"
|
throw "BB_REFERENCE_SINGLE cannot be an array"
|
||||||
|
@ -149,7 +149,7 @@ export async function processOutputBBReferences(
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FieldType.BB_REFERENCE:
|
case FieldType.BB_REFERENCE: {
|
||||||
const ids =
|
const ids =
|
||||||
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
typeof value === "string" ? value.split(",").filter(id => !!id) : value
|
||||||
|
|
||||||
|
@ -174,8 +174,8 @@ export async function processOutputBBReferences(
|
||||||
default:
|
default:
|
||||||
throw utils.unreachable(subtype)
|
throw utils.unreachable(subtype)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case FieldType.BB_REFERENCE_SINGLE:
|
case FieldType.BB_REFERENCE_SINGLE: {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
@ -199,6 +199,7 @@ export async function processOutputBBReferences(
|
||||||
firstName: user.firstName,
|
firstName: user.firstName,
|
||||||
lastName: user.lastName,
|
lastName: user.lastName,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw utils.unreachable(type)
|
throw utils.unreachable(type)
|
||||||
|
|
Loading…
Reference in New Issue