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'm upgrading from version 2 to 4 for a large codebase and noticed that the method chaining behavior seems to have changed:
# Before
sig do
params(foo: String)
.returns(Integer)
end
# After
sig do
params(foo: String).returns(Integer)
end
# Before
Fixture
.of(Foo)
.create!(bar: 1)
# After
Fixture.of(Foo).create!(
bar: 1
)
# Before
foo = Foo
.where(foo: bar)
.where(baz: 4)
# After
foo =
Foo.where(
foo: bar
).where(baz: 4)
Which seems intended looking at the tests[0], where it also seems to be a bit inconsistent between tests—e.g., within sig blocks doesn't chain while chains with other methods does. Is there a way to force the old behavior of always chaining? Maybe with a syntax-tree plugin?
I'm upgrading from version 2 to 4 for a large codebase and noticed that the method chaining behavior seems to have changed:
Which seems intended looking at the tests[0], where it also seems to be a bit inconsistent between tests—e.g.,
within sig blocks
doesn't chain whilechains with other methods
does. Is there a way to force the old behavior of always chaining? Maybe with a syntax-tree plugin?[0] https://github.com/prettier/plugin-ruby/blob/main/test/js/ruby/nodes/calls.test.js#L63-L68
The text was updated successfully, but these errors were encountered: