mirror of
https://github.com/sasjs/lint.git
synced 2026-01-12 23:00:05 +00:00
feat(lint): add rule for indentation multiple
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { hasDoxygenHeader } from '../rules/hasDoxygenHeader'
|
||||
import { indentationMultiple } from '../rules/indentationMultiple'
|
||||
import { lowerCaseFileNames } from '../rules/lowerCaseFileNames'
|
||||
import { maxLineLength } from '../rules/maxLineLength'
|
||||
import { noEncodedPasswords } from '../rules/noEncodedPasswords'
|
||||
@@ -19,6 +20,7 @@ export class LintConfig {
|
||||
readonly fileLintRules: FileLintRule[] = []
|
||||
readonly pathLintRules: PathLintRule[] = []
|
||||
readonly maxLineLength = 80
|
||||
readonly indentationMultiple = 2
|
||||
|
||||
constructor(json?: any) {
|
||||
if (json?.noTrailingSpaces) {
|
||||
@@ -38,6 +40,11 @@ export class LintConfig {
|
||||
this.lineLintRules.push(maxLineLength)
|
||||
}
|
||||
|
||||
if (json?.indentationMultiple) {
|
||||
this.indentationMultiple = json.indentationMultiple
|
||||
this.lineLintRules.push(indentationMultiple)
|
||||
}
|
||||
|
||||
if (json?.hasDoxygenHeader) {
|
||||
this.fileLintRules.push(hasDoxygenHeader)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user