Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.43 KB

double-slash-comment-whitespace-inside.md

File metadata and controls

68 lines (43 loc) · 1.43 KB

Pattern: Malformed whitespace in //-comment

Issue: -

Description

Require or disallow whitespace after the // in //-comments

a {
  width: 10px; // inline-comment
/*
 * Such whitespace */

This rule only works with SCSS-like single-line comments and ignores CSS comments (/* */).

Any number of slashes are allowed at the beginning of the comment. So /// comment is treated the same way as // comment.

Note that a newline is not possible as a whitespace in terms of this rule as //-comments are intended to be single-line.

Examples

string: "always"|"never"

"always"

There must always be whitespace after the // inside //-comments.

The following patterns are considered warnings:

//comment

The following patterns are not considered warnings:

// comment
///   comment

"never"

There must never be whitespace after the // inside //-comments.

The following patterns are considered warnings:

// comment

The following patterns are not considered warnings:

//comment
///comment

Further Reading