# 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 */
  $: 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

# πŸ” Implementation