UNPKG

declapract

Version:

A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.

36 lines (35 loc) 1.08 kB
import { DomainObject } from 'domain-objects'; import Joi from 'joi'; import { ProjectVariablesImplementation } from '../constants'; /** * info about the context in which a file is checked */ export interface FileCheckContext { /** * the path of the file being checked, relative to the project root */ relativeFilePath: string; /** * the variables declared for this project */ projectVariables: ProjectVariablesImplementation; /** * the names of the practices enabled for this project */ projectPractices: string[]; /** * the file contents that were declared to be checked against */ declaredFileContents: string | null; /** * defines whether this file is required or optional */ required: boolean; /** * enables getting the root directory of the project being evaluated */ getProjectRootDirectory: () => string; } export declare class FileCheckContext extends DomainObject<FileCheckContext> implements FileCheckContext { static schema: Joi.ObjectSchema<any>; }