Open Lonli-Lokli opened 2 years ago
In my mind, it's better to enforce smth like maximum cyclomatic complexity per field.
e.g. there are plenty of lines of code 👇
sample({
clock: [
route.opened,
route.updated
],
source: $tier,
filter: and(
$premiumUser,
$subscriptionActive
),
target: showModal
})
but it is steal readble.
Enforce a maximum number of lines of code in a unit
Some people consider large functions a code smell. Large
fn
orfilter
insample
can make it hard to follow what’s going on. This rule should help enforce that style. It should have separate configurations for all major units (sample, guard, effect) with appropriate default values per each