noUndeclaredCustomProperties (JavaScript)
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/noUndeclaredCustomProperties - This rule doesn’t have a fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noUndeclaredCustomProperties": "error" } } }}Description
Section titled “Description”Reports custom properties used with var() that have no visible declaration.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<div style="color: var(--text-color)" />code-block.jsx:1:24 lint/nursery/noUndeclaredCustomProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ The custom property --text-color is not defined.
> 1 │ <div style="color: var(--text-color)" />
│ ^^^^^^^^^^^^
2 │
ℹ An undeclared custom property can indicate a misspelled name or a missing declaration.
ℹ Define the custom property in an available stylesheet, rename it or remove it.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
<div style="--text-color: blue; color: var(--text-color)" />Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.