Fix/disable no unsafe optional chaining (#25553)
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
"no-unassigned-vars": "warn",
|
"no-unassigned-vars": "warn",
|
||||||
"no-unsafe-finally": "warn",
|
"no-unsafe-finally": "warn",
|
||||||
"no-unsafe-negation": "warn",
|
"no-unsafe-negation": "warn",
|
||||||
"no-unsafe-optional-chaining": "warn",
|
"no-unsafe-optional-chaining": "error",
|
||||||
"no-unused-labels": "warn",
|
"no-unused-labels": "warn",
|
||||||
"no-unused-private-class-members": "warn",
|
"no-unused-private-class-members": "warn",
|
||||||
"no-unused-vars": "warn",
|
"no-unused-vars": "warn",
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ const formatItem = (
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
const obj = findExceptVarInObject(isFile ? { ...v, children } : v, filterVar, selector, isFile)
|
const obj = findExceptVarInObject(isFile ? { ...v, children } : v, filterVar, selector, isFile)
|
||||||
return obj?.children && ((obj?.children as Var[]).length > 0 || Object.keys((obj?.children as StructuredOutput)?.schema?.properties || {}).length > 0)
|
return hasValidChildren(obj?.children)
|
||||||
}).map((v) => {
|
}).map((v) => {
|
||||||
const isFile = v.type === VarType.file
|
const isFile = v.type === VarType.file
|
||||||
|
|
||||||
@@ -813,7 +813,7 @@ export const getVarType = ({
|
|||||||
if (isIterationInnerVar) {
|
if (isIterationInnerVar) {
|
||||||
if (valueSelector[1] === 'item') {
|
if (valueSelector[1] === 'item') {
|
||||||
const itemType = getIterationItemType({
|
const itemType = getIterationItemType({
|
||||||
valueSelector: (parentNode?.data as any).iterator_selector || [],
|
valueSelector: (parentNode?.data as any)?.iterator_selector || [],
|
||||||
beforeNodesOutputVars,
|
beforeNodesOutputVars,
|
||||||
})
|
})
|
||||||
return itemType
|
return itemType
|
||||||
@@ -832,7 +832,7 @@ export const getVarType = ({
|
|||||||
if (isLoopInnerVar) {
|
if (isLoopInnerVar) {
|
||||||
if (valueSelector[1] === 'item') {
|
if (valueSelector[1] === 'item') {
|
||||||
const itemType = getLoopItemType({
|
const itemType = getLoopItemType({
|
||||||
valueSelector: (parentNode?.data as any).iterator_selector || [],
|
valueSelector: (parentNode?.data as any)?.iterator_selector || [],
|
||||||
beforeNodesOutputVars,
|
beforeNodesOutputVars,
|
||||||
})
|
})
|
||||||
return itemType
|
return itemType
|
||||||
|
|||||||
Reference in New Issue
Block a user