# stylus/single-line-comment

enforces comment style where single-line comments are allowed.

  • ⚙️ This rule is included in "stylelint-plugin-stylus/standard". (options: "always")
  • 🔧 The fix option (opens new window) can automatically fix some of the problems reported by this rule.

# 📖 Rule Details

This rule enforces comment style where single-line comments are allowed.

# 🔧 Options

{
  "stylus/single-line-comment": ["always" | "never"]
}
  • "always" ... Requires single-line comments.
  • "never" ... Disallows single-line comments.

# "always"

// ✓ GOOD // single line comment .foo { // single line comment } .bar { /* not eol comment */ } /* * multi * line * comment */ /*! buffered */ /* ✗ BAD */ /* multi line comment, but a single line. */ /* multi-line comment, but the content is a single line. */ .foo { /* multi line comment, but a single line. */ }
Now loading...

# "never"

/* ✓ GOOD */ /* multi line comment */ .foo { /* multi line comment */ } // ✗ BAD // single line comment .foo { // single line comment }
Now loading...

# 📚 Further reading

# 🔍 Implementation