I have the following code like this in Typescript:
await expect(
users[0]
.GreetingsRegistry
.setMessage(testMessage)
)
.to
.emit(GreetingsRegistry, 'MessageChanged')
.withArgs(users[0].address, testMessage);
I'm using prettier to format my code but it's getting extremely annoying as it keeps unwrapping my lines especially in chained calls. I intentionally put them in new lines for readability. But it keeps reformatting to this:
await expect(users[0].GreetingsRegistry.setMessage(testMessage))
.to.emit(GreetingsRegistry, "MessageChanged")
.withArgs(users[0].address, testMessage)
What prettier has produced is simply rubbish because it's so much harder to read now! I tried adding eslint rules into prettierrc but it doesn't work too.
How can I configure prettier to wrap multi-lines properly?