From 9a449842646d3dfdde6303d7d655db1c6e8b87bc Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Tue, 10 Jan 2023 20:59:00 +0500 Subject: [PATCH] chore: quick fix --- src/rules/line/maxLineLength.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rules/line/maxLineLength.ts b/src/rules/line/maxLineLength.ts index 0b5e97a..05ce2a9 100644 --- a/src/rules/line/maxLineLength.ts +++ b/src/rules/line/maxLineLength.ts @@ -2,6 +2,7 @@ import { LintConfig } from '../../types' import { LineLintRule } from '../../types/LintRule' import { LintRuleType } from '../../types/LintRuleType' import { Severity } from '../../types/Severity' +import { DefaultLintConfiguration } from '../../utils' const name = 'maxLineLength' const description = 'Restrict lines to the specified length.' @@ -14,7 +15,9 @@ const test = ( isHeaderLine?: boolean ) => { const severity = config?.severityLevel[name] || Severity.Warning - let maxLineLength = config?.maxLineLength || 80 + let maxLineLength = config + ? config.maxLineLength + : DefaultLintConfiguration.maxLineLength if (isHeaderLine && config) { maxLineLength = Math.max(config.maxLineLength, config.maxHeaderLineLength)