Skip to content

Files

Latest commit

 

History

History
70 lines (48 loc) · 1.23 KB

no-eol-whitespace.md

File metadata and controls

70 lines (48 loc) · 1.23 KB

Pattern: Trailing whitespace

Issue: -

Description

Adding trailing whitespace can cause extra work for others editing the same file, when they merge, as can removing existing trailing whitespace. So: Don't introduce trailing whitespace. Remove it if you're already changing that line, or do it in a separate clean-up operation (preferably when no-one else is working on the file).

Examples

The following patterns are considered violations:

a { color: pink; }···
/**               ↑
 *  This whitespace */
a { color: pink; }·

Comment strings are also checked -- so the following is a violation:

/* something····
 * something else */

The following patterns are not considered violations:

a { color: pink; }
/* something
 * something else */

Configuration

ignore: ["empty-lines"]

"empty-lines"

Allow end-of-line whitespace for lines that are only whitespace, "empty" lines.

The following patterns are not considered violations:

a {
  color: pink;
··
  background: orange;
}
····
a { color: pink; }
····

Further Reading