type O1 = {
A: number;
};
type O2 = { A: number };
Hello. I'm new to prettier and I run to the problem with formatting my async / await functions. In eslint configuration I have this rule dissabled have rule space-before-function-paren but still prettier is formatting the code incorrectly.
Expected formating:
test('Refresh token', async() {
const response = await chakram.post(`/v2/sso/refresh`, {
refreshToken
})
Joi.assert(response.body, validators.responsePostRefresh)
})
Given:
test('Refresh token', async () {
const response = await chakram.post(`/v2/sso/refresh`, {
refreshToken
})
Joi.assert(response.body, validators.responsePostRefresh)
})
Can you help me to not have space between async and brackets. What Am I missing?
autocrlf
. Which is exactly what happened to me now.autocrlf
(unless this was changed recently too), so why oh why would you introduce conflicts with this only to protect from maybe 2% of Windows users who have their git settings wrong?
i've come across something i don't love about prettier formatting in html (and other markup languages like xml or any using <tags>
).
I start with one long line like this
<q-btn v-if="this.multifactorEnabled === false" name="multifactorEnabled" @click="enablesMfa">Enable MFA</q-btn>
prettier wraps that like so
<q-btn v-if="this.multifactorEnabled === false" name="multifactorEnabled" @click="enablesMfa"
>Enable MFA</q-btn
>
but this is hideous. i reformat it to
<q-btn v-if="this.multifactorEnabled === false" name="multifactorEnabled" @click="enablesMfa">
Enable MFA
</q-btn>
and prettier is fine with this. is there some kind of option to adjust this behavior?