Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Jun 26, 2024
1 parent efb61d4 commit 2bba5bb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ComposedFieldMultiple = ({
.filter(([_, metadataField]) => metadataField.isRequired)
.map(([key, _]) => key)
: [],
[]
[childMetadataFields, notRequiredWithChildFieldsRequired]
)

const childFieldNamesThatTriggerRequired = useMemo(
Expand All @@ -54,7 +54,7 @@ export const ComposedFieldMultiple = ({
.filter(([_, metadataField]) => !metadataField.isRequired)
.map(([key, _]) => key)
: [],
[]
[childMetadataFields, notRequiredWithChildFieldsRequired]
)

const handleOnAddField = (index: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const ComposedField = ({
.filter(([_, metadataField]) => metadataField.isRequired)
.map(([key, _]) => key)
: [],
[]
[childMetadataFields, notRequiredWithChildFieldsRequired]
)

const childFieldNamesThatTriggerRequired = useMemo(
Expand All @@ -41,7 +41,7 @@ export const ComposedField = ({
.filter(([_, metadataField]) => !metadataField.isRequired)
.map(([key, _]) => key)
: [],
[]
[childMetadataFields, notRequiredWithChildFieldsRequired]
)

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const Primitive = ({
}
}
return rulesToApply
}, [rulesToApply, fieldShouldBecomeRequired])
}, [rulesToApply, fieldShouldBecomeRequired, displayName, isFieldThatMayBecomeRequired, t])

const isTextArea = type === TypeMetadataFieldOptions.Textbox

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const Vocabulary = ({
}
}
return rulesToApply
}, [rulesToApply, fieldShouldBecomeRequired])
}, [rulesToApply, fieldShouldBecomeRequired, displayName, isFieldThatMayBecomeRequired, t])

return (
<Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const useWatchFieldsThatTriggerRequired = ({ fieldsToWatch, builtFieldName }: Pr
if (!fieldShouldBecomeRequired) {
clearErrors(builtFieldName)
}
}, [fieldShouldBecomeRequired])
}, [fieldShouldBecomeRequired, builtFieldName, clearErrors])

return fieldShouldBecomeRequired
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { fireEvent } from '@testing-library/react'
import { MetadataBlockName } from '../../../../../src/dataset/domain/models/Dataset'
import { DatasetRepository } from '../../../../../src/dataset/domain/repositories/DatasetRepository'
import { TypeMetadataFieldOptions } from '../../../../../src/metadata-block-info/domain/models/MetadataBlockInfo'
Expand Down

0 comments on commit 2bba5bb

Please sign in to comment.