Skip to content

FileHeaderGeneratorConfig

Defined in: policyDefiners/defineFileHeaderPolicy.ts:36

Configuration for generating file headers with specific formatting rules.

This interface extends FileHeaderPolicyConfig and adds formatting-specific properties to control how headers are inserted into different file types.

optional autoGenText?: string

Defined in: policyDefiners/defineFileHeaderPolicy.ts:24

An optional string that will be appended to the headerText.

FileHeaderPolicyConfig.autoGenText


optional headerEnd?: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:59

Regex matching the header postfix.


optional headerStart?: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:44

Regex matching the header prefix, such as a block-comment opener.


optional headerText?: string

Defined in: policyDefiners/defineFileHeaderPolicy.ts:19

The text to use as the header.

FileHeaderPolicyConfig.headerText


lineEnd: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:54

Regex matching the end of each line (e.g., \r?\n)


lineStart: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:49

Regex matching beginning of each line (e.g. ’ * ’)


match: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:39

Regular expression that matches files this header generator applies to


replacer: (content, config) => string

Defined in: policyDefiners/defineFileHeaderPolicy.ts:68

Function that generates the properly formatted header content for insertion into files.

string

The original file content

FileHeaderPolicyConfig

The file header policy configuration

string

The formatted header string to insert