--- ruleName: comment-format description: Enforces formatting rules for single-line comments. rationale: 'Helps maintain a consistent, readable style in your codebase.' optionsDescription: |- Three arguments may be optionally provided: * `"check-space"` requires that all single-line comments must begin with a space, as in `// comment` * note that comments starting with `///` are also allowed, for things such as `///` * `"check-lowercase"` requires that the first non-whitespace character of a comment must be lowercase, if applicable. * `"check-uppercase"` requires that the first non-whitespace character of a comment must be uppercase, if applicable. options: type: array items: type: string enum: - check-space - check-lowercase - check-uppercase minLength: 1 maxLength: 3 optionExamples: - '[true, "check-space", "check-lowercase"]' type: style optionsJSON: |- { "type": "array", "items": { "type": "string", "enum": [ "check-space", "check-lowercase", "check-uppercase" ] }, "minLength": 1, "maxLength": 3 } layout: rule title: 'Rule: comment-format' ---