# svelte/no-reactive-literals
donβt assign literal values in reactive statements
- π‘ Some problems reported by this rule are manually fixable by editor suggestions.
# π Rule Details
This rule reports on any assignment of a static, unchanging value within a reactive statement because itβs not necessary.
<script>
/* eslint svelte/no-reactive-literals: "error" */
/* β GOOD */
let foo = 'bar';
/* β BAD */
Do not assign literal values inside reactive statements unless absolutely necessary. (svelte/no-reactive-literals)$: foo = 'bar';
</script>
# π§ Options
Nothing.
# β€οΈ Compatibility
This rule was taken from @tivac/eslint-plugin-svelte.
This rule is compatible with @tivac/svelte/reactive-literals
rule.
# π Version
This rule was introduced in eslint-plugin-svelte v2.4.0