useSymbolDescription
Summary
Section titled “Summary”- Rule available since:
v2.0.0 - Diagnostic Category:
lint/style/useSymbolDescription - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Same as
symbol-description
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "style": { "useSymbolDescription": "error" } } }}Description
Section titled “Description”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.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”Symbol();code-block.js:1:7 lint/style/useSymbolDescription ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Symbol() is missing a description parameter.
> 1 │ Symbol();
│ ^^
2 │
ℹ Add explicit description which can be useful in debugging and making the purpose of the symbol clearer.
Symbol('');code-block.js:1:7 lint/style/useSymbolDescription ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Symbol() is missing a description parameter.
> 1 │ Symbol(”);
│ ^^^^
2 │
ℹ Add explicit description which can be useful in debugging and making the purpose of the symbol clearer.
Symbol(``);code-block.js:1:8 lint/style/useSymbolDescription ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Symbol() is missing a description parameter.
> 1 │ Symbol(“);
│ ^^^^
2 │
ℹ Add explicit description which can be useful in debugging and making the purpose of the symbol clearer.
Symbol('description');Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.