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
I'm able to use dbeaver to format sql in spotless. But dbeaver doesn't format back tick correctly. It formats a column name like a-b to a - b (adding extra whitespace) which makes the sql invalid. I don't find a way to fix this issue. So I want to try prettier instead.
I tried the following configs but it doesn't work. I got the error "Caused by: com.diffplug.spotless.npm.SimpleRestClient$SimpleRestResponseException: Unexpected response status code at /prettier/format [HTTP 500] -- (Error while formatting: ConfigError: Couldn't resolve parser "sql".)"
I tried to google an example to use prettier for sql formatter but can't find one. Can someone point me to a valid example or show me how to use prettier for sql?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm able to use dbeaver to format sql in spotless. But dbeaver doesn't format back tick correctly. It formats a column name like
a-b
toa - b
(adding extra whitespace) which makes the sql invalid. I don't find a way to fix this issue. So I want to try prettier instead.I tried the following configs but it doesn't work. I got the error "Caused by: com.diffplug.spotless.npm.SimpleRestClient$SimpleRestResponseException: Unexpected response status code at /prettier/format [HTTP 500] -- (Error while formatting: ConfigError: Couldn't resolve parser "sql".)"
`spotless {
sql {
target 'src/main/resources/*.sql'
}`
I tried to google an example to use prettier for sql formatter but can't find one. Can someone point me to a valid example or show me how to use prettier for sql?
Beta Was this translation helpful? Give feedback.
All reactions