1
0
mirror of https://github.com/sasjs/lint.git synced 2025-12-11 01:44:36 +00:00

chore: quick fix

This commit is contained in:
2023-01-10 20:59:00 +05:00
parent 54f887fc6d
commit 9a44984264

View File

@@ -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)