FileHeaderGeneratorConfig
Defined in: policyDefiners/defineFileHeaderPolicy.ts:35
Configuration for generating file headers with specific formatting rules.
Remarks
Section titled “Remarks”This interface extends FileHeaderPolicyConfig and adds formatting-specific properties to control how headers are inserted into different file types.
Extends
Section titled “Extends”Properties
Section titled “Properties”autoGenText?
Section titled “autoGenText?”
optionalautoGenText?:string
Defined in: policyDefiners/defineFileHeaderPolicy.ts:23
An optional string that will be appended to the headerText.
Inherited from
Section titled “Inherited from”FileHeaderPolicyConfig.autoGenText
headerEnd?
Section titled “headerEnd?”
optionalheaderEnd?:RegExp
Defined in: policyDefiners/defineFileHeaderPolicy.ts:58
Regex matching the header postfix.
headerStart?
Section titled “headerStart?”
optionalheaderStart?:RegExp
Defined in: policyDefiners/defineFileHeaderPolicy.ts:43
Regex matching the header prefix, such as a block-comment opener.
headerText?
Section titled “headerText?”
optionalheaderText?:string
Defined in: policyDefiners/defineFileHeaderPolicy.ts:18
The text to use as the header.
Inherited from
Section titled “Inherited from”FileHeaderPolicyConfig.headerText
lineEnd
Section titled “lineEnd”lineEnd:
RegExp
Defined in: policyDefiners/defineFileHeaderPolicy.ts:53
Regex matching the end of each line (e.g., \r?\n)
lineStart
Section titled “lineStart”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
Section titled “replacer”replacer: (
content,config) =>string
Defined in: policyDefiners/defineFileHeaderPolicy.ts:67
Function that generates the properly formatted header content for insertion into files.
Parameters
Section titled “Parameters”content
Section titled “content”string
The original file content
config
Section titled “config”The file header policy configuration
Returns
Section titled “Returns”string
The formatted header string to insert