1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-08 21:10:05 +00:00

feat: add new property severityLevel

This commit is contained in:
2022-11-16 22:40:17 +05:00
parent 8031468926
commit 0cff87fe12
18 changed files with 213 additions and 33 deletions

View File

@@ -11,8 +11,11 @@ const description =
const message = 'File missing Doxygen header'
const messageForSingleAsterisk =
'File not following Doxygen header style, use double asterisks'
const test = (value: string, config?: LintConfig) => {
const lineEnding = config?.lineEndings === LineEndings.CRLF ? '\r\n' : '\n'
const severity = config?.severityLevel[name] || Severity.Warning
try {
const hasFileHeader = value.trimStart().startsWith('/**')
if (hasFileHeader) return []
@@ -27,7 +30,7 @@ const test = (value: string, config?: LintConfig) => {
.length + 1,
startColumnNumber: 1,
endColumnNumber: 1,
severity: Severity.Warning
severity
}
]
@@ -37,7 +40,7 @@ const test = (value: string, config?: LintConfig) => {
lineNumber: 1,
startColumnNumber: 1,
endColumnNumber: 1,
severity: Severity.Warning
severity
}
]
} catch (e) {
@@ -47,7 +50,7 @@ const test = (value: string, config?: LintConfig) => {
lineNumber: 1,
startColumnNumber: 1,
endColumnNumber: 1,
severity: Severity.Warning
severity
}
]
}