mirror of
https://github.com/sasjs/lint.git
synced 2026-01-17 01:00:06 +00:00
chore: quick fix
This commit is contained in:
@@ -2,6 +2,7 @@ import { LintConfig } from '../../types'
|
|||||||
import { LineLintRule } from '../../types/LintRule'
|
import { LineLintRule } from '../../types/LintRule'
|
||||||
import { LintRuleType } from '../../types/LintRuleType'
|
import { LintRuleType } from '../../types/LintRuleType'
|
||||||
import { Severity } from '../../types/Severity'
|
import { Severity } from '../../types/Severity'
|
||||||
|
import { DefaultLintConfiguration } from '../../utils'
|
||||||
|
|
||||||
const name = 'maxLineLength'
|
const name = 'maxLineLength'
|
||||||
const description = 'Restrict lines to the specified length.'
|
const description = 'Restrict lines to the specified length.'
|
||||||
@@ -14,7 +15,9 @@ const test = (
|
|||||||
isHeaderLine?: boolean
|
isHeaderLine?: boolean
|
||||||
) => {
|
) => {
|
||||||
const severity = config?.severityLevel[name] || Severity.Warning
|
const severity = config?.severityLevel[name] || Severity.Warning
|
||||||
let maxLineLength = config?.maxLineLength || 80
|
let maxLineLength = config
|
||||||
|
? config.maxLineLength
|
||||||
|
: DefaultLintConfiguration.maxLineLength
|
||||||
|
|
||||||
if (isHeaderLine && config) {
|
if (isHeaderLine && config) {
|
||||||
maxLineLength = Math.max(config.maxLineLength, config.maxHeaderLineLength)
|
maxLineLength = Math.max(config.maxLineLength, config.maxHeaderLineLength)
|
||||||
|
|||||||
Reference in New Issue
Block a user