Pattern: Inconsistent variable and callback function names
Issue: -
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, (b) => {});
derived(a, (b, set) => {});
derived([a, b], ([one, two]) => {});
Nothing.
This rule was introduced in eslint-plugin-svelte v2.8.0