This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------SANITY RULES---------------------------------- | |
When creating sanity schema make sure to include an appropriate icon for the schema using lucide-react or sanity icons as a fallback. Make sure it's always a named export, make sure you're always using the Sanity typescript definitions if it's a ts file. Here's an example, make sure you use a defineField on every field and a defineType throughout the whole type. If you don't see any arrayMembers, don't import it: | |
import {defineField, defineType, defineArrayMember} from 'sanity' if it's a .ts file. | |
defineType({ | |
type: 'object', | |
name: 'custom-object', | |
fields: [ | |
defineField({ |