diff --git a/src/__tests__/test3.yaml b/src/__tests__/test3.yaml index f03795b..d490a3a 100644 --- a/src/__tests__/test3.yaml +++ b/src/__tests__/test3.yaml @@ -1,2 +1,4 @@ name: Jane Doe age: 39 +--- +gender: female diff --git a/src/index.ts b/src/index.ts index 9daedd2..1a7e7d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import { readFile } from 'fs'; import { - load, + loadAll, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, @@ -23,7 +23,7 @@ export type Options = { export const lint = (content: string, opts?: Options): Promise => new Promise((resolve, reject) => { try { - load(content, { + loadAll(content, undefined, { schema: schemas[opts?.schema ?? 'DEFAULT_SCHEMA'], }); resolve(true);