# svelte/derived-has-same-inputs-outputs
derived store should use same variable names between values and callback
# π Rule Details
This rule reports where variable names and callback functionβs argument names are different. This is mainly a recommended rule to avoid implementation confusion.
/* eslint svelte/derived-has-same-inputs-outputs: "error" */
import { derived } from 'svelte/store';
/* β GOOD */
derived(a, ($a) => {});
derived(a, ($a, set) => {});
derived([a, b], ([$a, $b]) => {});
/* β BAD */
derived(a, (The argument name should be '$a'. (svelte/derived-has-same-inputs-outputs)b) => {});
derived(a, (The argument name should be '$a'. (svelte/derived-has-same-inputs-outputs)b, set) => {});
derived([a, b], ([The argument name should be '$a'. (svelte/derived-has-same-inputs-outputs)oneThe argument name should be '$b'. (svelte/derived-has-same-inputs-outputs), two]) => {});
# π§ Options
Nothing.
# π Further Reading
# π Version
This rule was introduced in eslint-plugin-svelte v2.8.0