Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.48 KB

File metadata and controls

56 lines (34 loc) · 1.48 KB

ember/template-linebreak-style

🔧 This rule is automatically fixable by the --fix CLI option.

Enforce consistent linebreaks in templates.

Having consistent linebreaks is important to make sure that the source code is rendered correctly in editors.

Rule Details

This rule enforces consistent line endings in templates, independent of the operating system.

Config

This rule accepts a single string option:

  • "unix" (default) — enforces the usage of Unix line endings: \n for LF
  • "windows" — enforces the usage of Windows line endings: \r\n for CRLF
  • "system" — enforces the usage of the current platform's line ending

Examples

Examples of incorrect code with the default "unix" config:

<div>test</div>\r\n

Examples of correct code with the default "unix" config:

<div>test</div>\n

Examples of incorrect code with the "windows" config:

<div>test</div>\n

Examples of correct code with the "windows" config:

<div>test</div>\r\n

Related Rules

References