qooxdoo / qooxdoo

qooxdoo - Universal JavaScript Framework
http://qooxdoo.org
Other
764 stars 259 forks source link

add option singleLineBlocks to es6ify command #10644

Closed p9malino26 closed 5 months ago

p9malino26 commented 5 months ago

This PR adds a command line option singleLineBlocks to the es6ify command. If enabled, it will force if statements or loops which are not followed by a block statement to have a single-line block statement. It is disabled by default, so it's non-breaking.

For example, it will turn this:

if (foo) 
  bar();

into this:

if (foo) {
  bar();
}

This is to ensure that the code is formatted by Prettier as per Qooxdoo's standards.