sheerun / prettier-standard

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
MIT License
868 stars 44 forks source link

Wrong formatting of generic function #89

Closed havenchyk closed 4 years ago

havenchyk commented 4 years ago

Hey, I have a code snippet that is correctly formatted with prettierx (even 0.7.1), but is not correctly formatted with prettier-standard

const foo = function<T>(bar: T) {
  return bar
}

here after prettier-standard formatting, a space between <T> and (bar: T) will be added.

Initially I created an issue against prettierx

adding a flag into .prettierrc.js didn't affect output.

brodycj commented 4 years ago

Initially I created an issue against prettierx

brodybits/prettierx#52 and this looks like something that should be resolved on prettierx

A new test case in prettierx would be very helpful.

havenchyk commented 4 years ago

Seems this weird behavior is fixed in prettierx, but to me it's not clear how to bump version of prettierx after it dropped typescript from dependencies. @brodybits what's your thoughts on it?

havenchyk commented 4 years ago

@sheerun could you please publish package once again?

sheerun commented 4 years ago

done