Skip to content

Class: CssDocConfigFile

Defined in: packages/config/src/CssDocConfigFile.ts:136

A loaded cssdoc.json (plus the files it extends), ready to configure a parser.

Properties

extendsFiles

ts
readonly extendsFiles: readonly CssDocConfigFile[];

Defined in: packages/config/src/CssDocConfigFile.ts:150

The resolved files this one extends, in declaration order.


fileNotFound

ts
readonly fileNotFound: boolean;

Defined in: packages/config/src/CssDocConfigFile.ts:140

Whether the file was absent.


filePath

ts
readonly filePath: string;

Defined in: packages/config/src/CssDocConfigFile.ts:138

The absolute path the file was loaded from (or would be, when not found).


globalPrecedence

ts
readonly globalPrecedence: "global" | "base";

Defined in: packages/config/src/CssDocConfigFile.ts:182

The precedence model when multiple records define the same modifier (with at least one marked @global): "base" (explicit modifiers override global; default) or "global" (global overrides). Merged across the extends chain (this file wins). Passed to @cssdoc/index for validation.


inlineComments?

ts
readonly optional inlineComments?: InlineCommentMode;

Defined in: packages/config/src/CssDocConfigFile.ts:154

How inline /* … */ comments combine with tag prose, if declared by this file.


messages

ts
readonly messages: readonly string[];

Defined in: packages/config/src/CssDocConfigFile.ts:142

Parse/validation/resolution messages collected while loading (this file only).


modifierConvention?

ts
readonly optional modifierConvention?: ModifierConventionInput;

Defined in: packages/config/src/CssDocConfigFile.ts:152

The modifier convention declared by this file, if any.


naming

ts
readonly naming: Readonly<NamingOverride>;

Defined in: packages/config/src/CssDocConfigFile.ts:171

The name-case conventions, merged across the extends chain (this file wins). Pass to resolveNaming in @cssdoc/providers.


noStandardTags

ts
readonly noStandardTags: boolean;

Defined in: packages/config/src/CssDocConfigFile.ts:144

Whether the file disables the standard tags.


providers

ts
readonly providers: readonly ProviderRef[];

Defined in: packages/config/src/CssDocConfigFile.ts:159

Upstream cssdoc providers this file consumes (this file's own — NOT inherited via extends, which carries configuration, not components). Resolve with resolveProviders.


render

ts
readonly render: Readonly<RenderConfig>;

Defined in: packages/config/src/CssDocConfigFile.ts:188

Markdown render options (sectionOrder/headingPrefix/baseHref), merged across the extends chain (this file wins). The emitter (@cssdoc/markdown/@cssdoc/typedoc) reads these as defaults; explicit emitter options still override. Not part of the parser CssDocConfiguration.


ruleOptions

ts
readonly ruleOptions: Readonly<RuleOptionsConfig>;

Defined in: packages/config/src/CssDocConfigFile.ts:166

Rule behavior policy options, merged across extends (this file wins).


ruleSeverities

ts
readonly ruleSeverities: Readonly<Record<string, RuleSeverityOverride>>;

Defined in: packages/config/src/CssDocConfigFile.ts:164

The per-rule severity overrides, merged across the extends chain (this file wins). Not the resolved severities — pass these to resolveRuleSeverities in @cssdoc/providers.


structureIgnore

ts
readonly structureIgnore: readonly string[];

Defined in: packages/config/src/CssDocConfigFile.ts:176

Class names exempt from the structure-unknown-selector rule, merged (union) across the extends chain. Pass to lintModel in @cssdoc/providers.


supportForTags

ts
readonly supportForTags: ReadonlyMap<string, boolean>;

Defined in: packages/config/src/CssDocConfigFile.ts:148

Per-tag support overrides declared by this file.


tagDefinitions

ts
readonly tagDefinitions: readonly CssDocTagDefinition[];

Defined in: packages/config/src/CssDocConfigFile.ts:146

The custom tag definitions declared by this file.

Accessors

hasErrors

Get Signature

ts
get hasErrors(): boolean;

Defined in: packages/config/src/CssDocConfigFile.ts:230

Whether this file — or any file it extends — reported an error.

Returns

boolean

Methods

configureParser()

ts
configureParser(configuration): void;

Defined in: packages/config/src/CssDocConfigFile.ts:250

Apply this file (and its extends chain) onto a CssDocConfiguration. Extended files are applied first so this file's settings win.

Parameters

configuration

CssDocConfiguration

The configuration to mutate.

Returns

void


getErrorSummary()

ts
getErrorSummary(): string;

Defined in: packages/config/src/CssDocConfigFile.ts:235

A newline-joined summary of every message from this file and its extends chain.

Returns

string


toConfiguration()

ts
toConfiguration(): CssDocConfiguration;

Defined in: packages/config/src/CssDocConfigFile.ts:272

Build a CssDocConfiguration from this file. Convenience for the common case.

Returns

CssDocConfiguration

A fresh configuration with this file applied.


loadFile()

ts
static loadFile(filePath): CssDocConfigFile;

Defined in: packages/config/src/CssDocConfigFile.ts:285

Load a cssdoc.json from an exact path. Missing files yield a fileNotFound instance (not an error); malformed ones collect messages.

Parameters

filePath

string

The config file path (resolved to absolute).

Returns

CssDocConfigFile

The loaded config file.


loadForFolder()

ts
static loadForFolder(folderPath): CssDocConfigFile;

Defined in: packages/config/src/CssDocConfigFile.ts:295

Find and load the nearest cssdoc.json, walking upward from folderPath to the filesystem root.

Parameters

folderPath

string

The folder to start from.

Returns

CssDocConfigFile

The nearest config file, or a fileNotFound instance rooted at folderPath.

Released under the MIT License