mirror of
https://github.com/sasjs/lint.git
synced 2026-01-09 21:40:06 +00:00
feat: customise the defaultHeader
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
import { lowerCaseFileNames, noSpacesInFileNames } from '../rules/path'
|
||||
import { LineEndings } from './LineEndings'
|
||||
import { FileLintRule, LineLintRule, PathLintRule } from './LintRule'
|
||||
import { getDefaultHeader } from '../utils'
|
||||
|
||||
/**
|
||||
* LintConfig is the logical representation of the .sasjslint file.
|
||||
@@ -32,6 +33,7 @@ export class LintConfig {
|
||||
readonly maxLineLength: number = 80
|
||||
readonly indentationMultiple: number = 2
|
||||
readonly lineEndings: LineEndings = LineEndings.LF
|
||||
readonly defaultHeader: string = getDefaultHeader()
|
||||
|
||||
constructor(json?: any) {
|
||||
if (json?.ignoreList) {
|
||||
@@ -87,6 +89,10 @@ export class LintConfig {
|
||||
this.fileLintRules.push(hasDoxygenHeader)
|
||||
}
|
||||
|
||||
if (json?.defaultHeader) {
|
||||
this.defaultHeader = json.defaultHeader
|
||||
}
|
||||
|
||||
if (json?.noSpacesInFileNames) {
|
||||
this.pathLintRules.push(noSpacesInFileNames)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user