# svelte/require-stores-init
require initial value in store
# 📖 Rule Details
This rule is aimed to enforce initial values when initializing the Svelte stores.
/* eslint svelte/require-stores-init: "error" */
import { writable, readable, derived } from 'svelte/store';
/* ✓ GOOD */
export const w1 = writable(false);
export const r1 = readable({});
export const d1 = derived([a, b], () => {}, false);
/* ✗ BAD */
export const w2 = writable();
export const r2 = readable();
export const d2 = derived([a, b], () => {});
# 🔧 Options
Nothing.
# ❤️ Compatibility
This rule was taken from @tivac/eslint-plugin-svelte.
This rule is compatible with @tivac/svelte/stores-initial-value
rule.
# 🚀 Version
This rule was introduced in eslint-plugin-svelte v2.5.0