validateLineBreaks

Option to check line break characters

Types: String, Object

Values:

  • String: setting this is the same as validating the rule using {character: String, reportOncePerFile: false}
  • Object:
    • character
      • String specifies the line break character that is allowed. (Values allowed: "CR", "LF" or "CRLF")
    • reportOncePerFile
      • true specifies that validation for the file should stop running upon encountering the first rule violation and return the details of that violation in the report
      • false specifies that all lines in the file should be validated with all rule violations captured in the final report

Example

"validateLineBreaks": "LF"
Valid for mode "LF"
var x = 1;<LF>
x++;
Invalid for mode "LF"
var x = 1;<CRLF>
x++;
Rule source
Test source