nrwl / precise-commits

:sparkles: Painlessly apply Prettier by only formatting lines you have modified anyway!
MIT License
471 stars 20 forks source link

Does not work with graphql files #73

Open inlightmedia opened 2 years ago

inlightmedia commented 2 years ago

When I make formatting changes to any *.graphql file precise-commits is not able to parse the file. When I remove graphql files from the whitelist the formatter runs perfectly.

The errors it throws in all *.graphql files is: SyntaxError: Syntax Error: Unexpected Name "thisWillCauseError". (1:1)

The following will cause an error.

type MyType {
  thisWillCauseError: String!
}

Prettier alone and/or with lint-staged formats these files without issue. So, it seems like this is specific to this library.