--- ruleName: no-unused-variable description: 'Disallows unused imports, variables, functions and private class members.' optionsDescription: |- Three optional arguments may be optionally provided: * `"check-parameters"` disallows unused function and constructor parameters. * NOTE: this option is experimental and does not work with classes that use abstract method declarations, among other things. * `"react"` relaxes the rule for a namespace import named `React` (from either the module `"react"` or `"react/addons"`). Any JSX expression in the file will be treated as a usage of `React` (because it expands to `React.createElement `). * `{"ignore-pattern": "pattern"}` where pattern is a case-sensitive regexp. Variable names that match the pattern will be ignored. options: type: array items: oneOf: - type: string enum: - check-parameters - react - type: object properties: ignore-pattern: type: string additionalProperties: false minLength: 0 maxLength: 3 optionExamples: - '[true, "react"]' - '[true, {"ignore-pattern": "^_"}]' type: functionality optionsJSON: |- { "type": "array", "items": { "oneOf": [ { "type": "string", "enum": [ "check-parameters", "react" ] }, { "type": "object", "properties": { "ignore-pattern": { "type": "string" } }, "additionalProperties": false } ] }, "minLength": 0, "maxLength": 3 } layout: rule title: 'Rule: no-unused-variable' ---