persona-community-5/.pnpm-store/v3/files/19/24456060d821af045f0892c6a20f94e51b9e1f5eabd12efd5e9ea045d0e604635bfa0d2202605938d42c4cc15a2bdf442c72b5677a1a0856a4c1f7883148c1
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

24 lines
762 B
Plaintext

import { BaseResolver, Document } from '../../../../resolve';
import { makeConfig, parseYamlToDocument } from '../../../../../__tests__/utils';
import { lintDocument } from '../../../../lint';
import { RuleConfig } from '../../../../config';
export async function lintDocumentForTest(
rules: Record<string, RuleConfig>,
document: Document,
additionalDocuments: { absoluteRef: string; body: string }[]
) {
const baseResolver = new BaseResolver();
additionalDocuments.forEach((item) =>
baseResolver.cache.set(
item.absoluteRef,
Promise.resolve(parseYamlToDocument(item.body, item.absoluteRef))
)
);
return await lintDocument({
externalRefResolver: baseResolver,
document,
config: await makeConfig({ rules }),
});
}