Код: Выделить всё
< /code>
Я использую следующую конфигурацию < /p>
format("xml") {
target("tt.xml")
toggleOffOn()
prettier().config(mapOf("parser" to "html", "tabWidth" to 4))
withinBlocks("SQL Statements", "") {
prettier(mapOf("prettier" to "3.5.3", "prettier-plugin-sql" to "0.18.0")).config(
mapOf(
"parser" to "sql",
"language" to "sql",
"tabWidth" to 4,
),
)
}
}
< /code>
Но я получаю эту ошибку < /p>
There were 1 lint error(s), they must be fixed or suppressed.
tt.xml:LINE_UNDEFINED toggle(com.diffplug.spotless.npm.SimpleRestClient$SimpleRestResponseException) Unexpected response status code at /prettier/format [HTTP 500] -- (Error while formatting: ConfigError: Couldn't resolve parser "sql".) (...)
Resolve these lints or suppress with `suppressLintsFor`
Подробнее здесь: https://stackoverflow.com/questions/795 ... g-prettier