sheerun / prettier-standard

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

Prevent prettier-standard from removing semicolons in Typescript interfaces #78

Closed arvinsim closed 5 years ago

arvinsim commented 5 years ago

I have this Typescript interface definition.

interface CurrencyAmountProps {
  value: number;
  currency: string;
}

I am currently using this command to format Typescript files

"format": "prettier-standard --parser typescript --write --trailing-comma=all",

The problem with formatting is that prettier-standard removes the semicolons after the value and currency lines.

This is valid Typescript but it is causing some issue when I try to use react-intl-cra to extract formatted messages.

Can I set rule in prettier-standard to not strip semicolons on interfaces? Or is it out of scope for the project?

sheerun commented 5 years ago

Isn't it better to fix react-intl-cra?

arvinsim commented 5 years ago

I am trying to fix in at the end. But would also like to know if the workaround above is possible with prettier-standard

sheerun commented 5 years ago

prettier-standard uses prettierx underneath so it would need provide such option first

sheerun commented 5 years ago

As of v12.0.0 prettier-standard doesn't remove such semicolons