Rule: comment-type

Allows a limited set of comment types


One or more of the following mutually exclusive comment types may be provided:

  • singleline: Comments starting with //
  • multiline: Comments between /* and */ but are not doc comments
  • doc: Multiline comments that start with /**
  • ‘directive’: Triple-slash directives that are singleline comments starting with ///
Config examples
"comment-type": [true, "doc", "singleline"]
"comment-type": [true, "singleline"]
"comment-type": [true, "multiline"]
  "type": "array",
  "items": {
    "type": "string",
    "enum": [
  "uniqueItems": true