You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would not expect anyway, since integer('id').primaryKey() is to me a chain of 1 - it would be fine if it were integer.primaryKey(), I expected that a 'chain' refers to occurrences of the . operator;
is weird indentation, not that there's really a great solution anyway
then if it really does get too long and we want to force it, we can always:
// GOOD{id: (foo().bar().baz()),}
or this could even just be new, unconfigurable, behaviour - since I'm really not sure what a sensible indentation would look like, all possibilities seem a bit weird:
Validations
Describe the bug
With
"@stylistic/newline-per-chained-call": ["error", {ignoreChainWithDepth: 1}]
:is reformatted to:
Which:
integer('id').primaryKey()
is to me a chain of 1 - it would be fine if it wereinteger.primaryKey()
, I expected that a 'chain' refers to occurrences of the.
operator;A workaround is to introduce parens:
which is a bit verbose but less odd looking than the zero indentation above.
To address (1), I think this should not be treated as a >1 chain.
Assuming it were
integer('id').something.primaryKey()
then, to address (2), I would suggest a configurable option for what happens in object values.then if it really does get too long and we want to force it, we can always:
or this could even just be new, unconfigurable, behaviour - since I'm really not sure what a sensible indentation would look like, all possibilities seem a bit weird:
or whatever else.
Reproduction
See description, I can't work out how to use Stackblitz for it
Contributes
The text was updated successfully, but these errors were encountered: