1
0
mirror of https://github.com/sasjs/lint.git synced 2025-12-10 17:34:36 +00:00

chore: quick fix

This commit is contained in:
2023-02-20 14:37:04 +05:00
parent 38656e9e89
commit c3a466f485
4 changed files with 5 additions and 5 deletions

View File

@@ -124,9 +124,8 @@ This will check each line to ensure that the count of leading spaces can be divi
### lineEndings
This setting ensures the line endings in a file conform to the configured type. Possible values are `lf` and `crlf`.
This setting ensures the line endings in a file conform to the configured type. Possible values are `lf` and `crlf`. If the value is missing, null or undefined then the check would be switched off (no default applied).
- Default: lf
- Severity: WARNING
### lowerCaseFileNames

View File

@@ -168,7 +168,8 @@ describe('LintConfig', () => {
hasMacroNameInMend: true,
noNestedMacros: true,
hasMacroParentheses: true,
noGremlins: true
noGremlins: true,
lineEndings: 'lf'
})
expect(config).toBeTruthy()

View File

@@ -82,7 +82,6 @@ export class LintConfig {
}
}
this.fileLintRules.push(lineEndings)
if (json?.lineEndings) {
if (
json.lineEndings !== LineEndings.LF &&
@@ -92,6 +91,7 @@ export class LintConfig {
`Invalid value for lineEndings: can be ${LineEndings.LF} or ${LineEndings.CRLF}`
)
}
this.fileLintRules.push(lineEndings)
this.lineEndings = json.lineEndings
}

View File

@@ -2,7 +2,7 @@ import * as fileModule from '@sasjs/utils/file'
import { LintConfig } from '../types/LintConfig'
import { getLintConfig } from './getLintConfig'
const expectedFileLintRulesCount = 6
const expectedFileLintRulesCount = 5
const expectedLineLintRulesCount = 6
const expectedPathLintRulesCount = 2