--- ruleName: variable-name description: Checks variable names for various errors. optionsDescription: |- Five arguments may be optionally provided: * `"check-format"`: allows only camelCased or UPPER_CASED variable names * `"allow-leading-underscore"` allows underscores at the beginning (only has an effect if "check-format" specified) * `"allow-trailing-underscore"` allows underscores at the end. (only has an effect if "check-format" specified) * `"allow-pascal-case"` allows PascalCase in addtion to camelCase. * `"ban-keywords"`: disallows the use of certain TypeScript keywords (`any`, `Number`, `number`, `String`, `string`, `Boolean`, `boolean`, `undefined`) as variable or parameter names. options: type: array items: type: string enum: - check-format - allow-leading-underscore - allow-trailing-underscore - allow-pascal-case - ban-keywords minLength: 0 maxLength: 5 optionExamples: - '[true, "ban-keywords", "check-format", "allow-leading-underscore"]' type: style optionsJSON: |- { "type": "array", "items": { "type": "string", "enum": [ "check-format", "allow-leading-underscore", "allow-trailing-underscore", "allow-pascal-case", "ban-keywords" ] }, "minLength": 0, "maxLength": 5 } layout: rule title: 'Rule: variable-name' ---