add docstring for rulesJsonSchema

This commit is contained in:
Nate 2025-06-16 16:21:45 -07:00
parent 17000f4311
commit 75f7facd10

View file

@ -49,7 +49,9 @@ const ruleObjectSchema = z.object({
});
const ruleSchema = z.union([z.string(), ruleObjectSchema]);
// TODO: What should be required?
/**
* A schema for rules.json files
*/
export const rulesJsonSchema = z.object({
name: z.string(),
version: z.string(),
@ -60,6 +62,9 @@ export const rulesJsonSchema = z.object({
export type Rule = z.infer<typeof ruleSchema>;
export type RuleObject = z.infer<typeof ruleObjectSchema>;
/**
* A schema for rules.json files
*/
export type RulesJson = z.infer<typeof rulesJsonSchema>;
const defaultUsesSchema = z.string();