In VSCode, each time I save a JS file, Prettier removes the space between the function keyword and its parenthesis.
It changes this:
function (parameter)
To this:
function(parameter)
But I want to keep the space.
Some people are suggesting adding this rule to VSCode setting:
"prettier.spaceBeforeFunctionParen": true
But apparently this rule doesn't exist any more.
How can I force a space between function and parenthesis in Prettier?
in setting.json add
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
after, when you save your work, eslint fix your error like space before function parenthese.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With