Having recently delved into the EsLint documentation, I've adopted the curly rule set to warning for instances of multiple or nested rows of statements within conditionals.
"rules": {
"curly":["warn", "multi-or-nest"],
"quotes":"warn"
}
While this rule functions as intended, I have encountered an issue with Prettier suggesting that statements following conditionals should be on a single line, a practice I prefer to avoid (and I do not wish to use unnecessary curly braces).
// Desired format
if(condition)
doSomething();
if(condition) {
doSomething();
doSomethingElse();
}
// Prettier format
if(condition) doSomeSome();
if(condition) {
doSomething();
doSomethingElse();
}
Despite consulting the Prettier documentation, I have not found a suitable solution such as bracketSpacing, which does not address my specific need for multiline bracketting.
How can I configure Prettier to align with my preferences? (In addition, where can I access additional information about other rules beyond the official documentation?)
It's worth noting that a similar inquiry posted previously received no responses, with suggestions in the comments indicating acceptance of Prettier's formatting standards (including the imposition of unnecessary curly braces). This approach contradicts my desire to tailor the configuration to my liking through an some_rc.json file.
Further, I came across an extensive discussion highlighting the long-standing demand for such an option since 2017, leading me to believe that it has likely been integrated (as it seems improbable that the developers disregarded user preferences). Am I misinformed?