eslint-plugin-json-schema-validator
Version:
ESLint plugin that validates data using JSON Schema Validator.
9 lines (8 loc) • 346 B
TypeScript
import type { SchemaObject } from "./ajv";
import type { RuleContext } from "../types";
export declare type Validator = (data: unknown) => ValidateError[];
export declare type ValidateError = {
message: string;
path: string[];
};
export declare function compile(schema: SchemaObject, schemaPath: string, context: RuleContext): Validator;