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
The only issue I've come across is where it reformats chained function calls onto the same line.
Any idea why it would reformat:
describe('root',()=>{it('should have GET for health check',done=>{request.get('/').expect(200).end(done);});});
into this:
describe('root',()=>{it('should have GET for health check',done=>{request.get('/').expect(200).end(done);});});
?
For additional context, I'm using the VS Code Plugin by Robin Malfait, and he suggested I ask here (see original issue).
As suggested by Robin, I tried overriding the newline-per-chained-call ESLint rule, but this didn't seem to have an effect on the formatting, although ESLint still picked up when I violated the rule.
The text was updated successfully, but these errors were encountered:
It's most likely due to your max-len setting. The best way to troubleshoot the issues is to try things with prettier first, see what happens, then take that output and apply eslint --fix to it and that is what you'll get from prettier-eslint.
My guess is prettier puts it on one line and the eslint rule is not fixable. You could improve this by making the eslint rule fixable (make a PR) to the rule. Until that rule is fixable, I'm afraid it's not compatible with prettier and therefore won't work with prettier-eslint.
Because there's nothing we can do in prettier-eslint, I'm going to go ahead and close this issue. I encourage you to try to make that rule fixable! It would be very helpful to the community! Maybe this will help! Good luck!
Thanks @kentcdodds! Although I'm all for creating a PR to fix an issue, I'm not sure where the issue currently lies. :)
After some further investigation I found that manually running prettier causes the behavior I showed in my OP, and then ESLint doesn't even report it as a problem, never mind fix it (based on the derived AirBnb rules we use).
Works great!
The only issue I've come across is where it reformats chained function calls onto the same line.
Any idea why it would reformat:
into this:
?
For additional context, I'm using the VS Code Plugin by Robin Malfait, and he suggested I ask here (see original issue).
As suggested by Robin, I tried overriding the
newline-per-chained-call
ESLint rule, but this didn't seem to have an effect on the formatting, although ESLint still picked up when I violated the rule.The text was updated successfully, but these errors were encountered: