Skip to content

Commit

Permalink
fix(schema): fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
juicycleff authored and bjoerge committed Apr 28, 2021
1 parent 041913b commit 0717b58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@sanity/schema/src/sanity/validation/types/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface PreviewConfig {
select?: {
[key: string]: string
}
// eslint-disable-next-line @typescript-eslint/ban-types
prepare?: Function
}

Expand Down Expand Up @@ -55,7 +56,7 @@ function validateFieldName(name): Array<any> {
return []
}

export function validateField(field, visitorContext) {
export function validateField(field, _visitorContext) {
if (!isPlainObject(field)) {
return [
error(
Expand All @@ -65,7 +66,7 @@ export function validateField(field, visitorContext) {
]
}

const {name, fieldset, ...fieldType} = field
const {name} = field
return 'name' in field
? validateFieldName(name)
: [error('Missing field name', HELP_IDS.OBJECT_FIELD_NAME_INVALID)]
Expand Down

0 comments on commit 0717b58

Please sign in to comment.