1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-15 16:20:05 +00:00

fix(lint): ignore indentation multiple when set to zero

This commit is contained in:
Krishna Acondy
2021-03-29 09:40:32 +01:00
parent f1adcb8cb4
commit 52b63bac58
4 changed files with 30 additions and 6 deletions

View File

@@ -19,8 +19,8 @@ export class LintConfig {
readonly lineLintRules: LineLintRule[] = []
readonly fileLintRules: FileLintRule[] = []
readonly pathLintRules: PathLintRule[] = []
readonly maxLineLength = 80
readonly indentationMultiple = 2
readonly maxLineLength: number = 80
readonly indentationMultiple: number = 2
constructor(json?: any) {
if (json?.noTrailingSpaces) {
@@ -40,8 +40,8 @@ export class LintConfig {
this.lineLintRules.push(maxLineLength)
}
if (json?.indentationMultiple) {
this.indentationMultiple = json.indentationMultiple
if (!isNaN(json?.indentationMultiple)) {
this.indentationMultiple = json.indentationMultiple as number
this.lineLintRules.push(indentationMultiple)
}