mirror of
https://github.com/sasjs/lint.git
synced 2025-12-10 17:34:36 +00:00
chore: add enum for lineEndings in sasjs-lint-schema.json
This commit is contained in:
@@ -125,7 +125,7 @@ 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`. If the value is missing, null or undefined then the check would be switched off (no default applied).
|
||||
This setting ensures the line endings in a file to conform the configured type. Possible values are `lf`, `crlf` and `off` (off means rule is set to be off). If the value is missing, null or undefined then the check would be switched off (no default applied).
|
||||
|
||||
- Severity: WARNING
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
"lineEndings": {
|
||||
"$id": "#/properties/lineEndings",
|
||||
"type": "string",
|
||||
"enum": ["lf", "crlf", "off"],
|
||||
"title": "lineEndings",
|
||||
"description": "Enforces the configured terminating character for each line. Shows a warning when incorrect line endings are present.",
|
||||
"default": "lf",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export enum LineEndings {
|
||||
LF = 'lf',
|
||||
CRLF = 'crlf'
|
||||
CRLF = 'crlf',
|
||||
OFF = 'off'
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export class LintConfig {
|
||||
}
|
||||
}
|
||||
|
||||
if (json?.lineEndings) {
|
||||
if (json?.lineEndings && json.lineEndings !== LineEndings.OFF) {
|
||||
if (
|
||||
json.lineEndings !== LineEndings.LF &&
|
||||
json.lineEndings !== LineEndings.CRLF
|
||||
|
||||
Reference in New Issue
Block a user