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:
@@ -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
|
||||
|
||||
@@ -168,7 +168,8 @@ describe('LintConfig', () => {
|
||||
hasMacroNameInMend: true,
|
||||
noNestedMacros: true,
|
||||
hasMacroParentheses: true,
|
||||
noGremlins: true
|
||||
noGremlins: true,
|
||||
lineEndings: 'lf'
|
||||
})
|
||||
|
||||
expect(config).toBeTruthy()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user