Skip to content

FileHeaderGeneratorConfig

Defined in: policyDefiners/defineFileHeaderPolicy.ts:35

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:23

An optional string that will be appended to the headerText.

FileHeaderPolicyConfig.autoGenText


optional headerEnd?: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:58

Regex matching the header postfix.


optional headerStart?: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:43

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


optional headerText?: string

Defined in: policyDefiners/defineFileHeaderPolicy.ts:18

The text to use as the header.

FileHeaderPolicyConfig.headerText


lineEnd: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:53

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


lineStart: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:48

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


match: RegExp

Defined in: policyDefiners/defineFileHeaderPolicy.ts:38

Regular expression that matches files this header generator applies to


replacer: (content, config) => string

Defined in: policyDefiners/defineFileHeaderPolicy.ts:67

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