src/content/docs/linter/rules/use-symbol-description.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> ## Summary - Rule available since: `v2.0.0` - Diagnostic Category: [`lint/style/useSymbolDescription`](/reference/diagnostics#diagnostic-category) - This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`symbol-description`](https://eslint.org/docs/latest/rules/symbol-description){
"linter": {
"rules": {
"style": {
"useSymbolDescription": "error"
}
}
}
}
Require a description parameter for the Symbol().
Symbol can have an optional description parameter which can be useful for
debugging and making the purpose of the symbol clearer.
Symbol();
Symbol('');
Symbol(``);
Symbol('description');