noSvelteLegacyConst
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/noSvelteLegacyConst - 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": { "noSvelteLegacyConst": "error" } } }}Description
Section titled “Description”Disallow legacy Svelte {@const} tags.
Declaration tags provide the current syntax for deriving values in Svelte markup (available since Svelte 5.56).
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{#each boxes as box} {@const area = box.width * box.height} <p>{area}</p>{/each}{#each boxes as box} {const area = $derived(box.width * box.height)} <p>{area}</p>{/each}References
Section titled “References”Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.