mirror of
https://github.com/sasjs/lint.git
synced 2026-01-07 12:40:05 +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
|
### 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
|
- Severity: WARNING
|
||||||
|
|
||||||
### lowerCaseFileNames
|
### lowerCaseFileNames
|
||||||
|
|||||||
@@ -168,7 +168,8 @@ describe('LintConfig', () => {
|
|||||||
hasMacroNameInMend: true,
|
hasMacroNameInMend: true,
|
||||||
noNestedMacros: true,
|
noNestedMacros: true,
|
||||||
hasMacroParentheses: true,
|
hasMacroParentheses: true,
|
||||||
noGremlins: true
|
noGremlins: true,
|
||||||
|
lineEndings: 'lf'
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(config).toBeTruthy()
|
expect(config).toBeTruthy()
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ export class LintConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fileLintRules.push(lineEndings)
|
|
||||||
if (json?.lineEndings) {
|
if (json?.lineEndings) {
|
||||||
if (
|
if (
|
||||||
json.lineEndings !== LineEndings.LF &&
|
json.lineEndings !== LineEndings.LF &&
|
||||||
@@ -92,6 +91,7 @@ export class LintConfig {
|
|||||||
`Invalid value for lineEndings: can be ${LineEndings.LF} or ${LineEndings.CRLF}`
|
`Invalid value for lineEndings: can be ${LineEndings.LF} or ${LineEndings.CRLF}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
this.fileLintRules.push(lineEndings)
|
||||||
this.lineEndings = json.lineEndings
|
this.lineEndings = json.lineEndings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as fileModule from '@sasjs/utils/file'
|
|||||||
import { LintConfig } from '../types/LintConfig'
|
import { LintConfig } from '../types/LintConfig'
|
||||||
import { getLintConfig } from './getLintConfig'
|
import { getLintConfig } from './getLintConfig'
|
||||||
|
|
||||||
const expectedFileLintRulesCount = 6
|
const expectedFileLintRulesCount = 5
|
||||||
const expectedLineLintRulesCount = 6
|
const expectedLineLintRulesCount = 6
|
||||||
const expectedPathLintRulesCount = 2
|
const expectedPathLintRulesCount = 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user