Rule: completed-docs

Enforces documentation for important items be filled out.

Config

true to enable for [“classes”, “functions”, “methods”, “properties”], or an array with each item in one of two formats:

  • string to enable for that type
  • object keying types to when their documentation is required:
    • "methods" and "properties" may specify:
      • "privacies":
        • "all"
        • "private"
        • "protected"
        • "public"
      • "locations":
        • "all"
        • "instance"
        • "static"
    • All other types may specify "visibilities":
      • "all"
      • "exported"
      • "internal"

Types that may be enabled are:

  • "classes"
  • "enums"
  • "enum-members"
  • "functions"
  • "interfaces"
  • "methods"
  • "namespaces"
  • "properties"
  • "types"
  • "variables"
Examples
"completed-docs": true
"completed-docs": [true, "enums", "functions", "methods"]
"completed-docs": [
  true,
  {
    "enums": true,
    "functions": {"visibilities": ["exported"]},
    "methods": {"locations": "instance", "privacies": ["public", "protected"]}
  }
]
Schema
{
  "type": "array",
  "items": {
    "anyOf": [
      {
        "enum": [
          "classes",
          "functions",
          "methods",
          "properties"
        ],
        "type": "string"
      },
      {
        "type": "object",
        "properties": {
          "classes": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "enums": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "enum-members": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "functions": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "interfaces": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "methods": {
            "properties": {
              "locations": {
                "enum": [
                  "all",
                  "instance",
                  "static"
                ],
                "type": "string"
              },
              "privacies": {
                "enum": [
                  "all",
                  "private",
                  "protected",
                  "public"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "namespaces": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "properties": {
            "properties": {
              "locations": {
                "enum": [
                  "all",
                  "instance",
                  "static"
                ],
                "type": "string"
              },
              "privacies": {
                "enum": [
                  "all",
                  "private",
                  "protected",
                  "public"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "types": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "variables": {
            "properties": {
              "visibilities": {
                "enum": [
                  "all",
                  "exported",
                  "internal"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      }
    ]
  }
}