You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This somewhat duplicates what has been discussed before, but AFAICT has not been succinctly condensed into a feature request before. Most people seem to have a very strong opinion about this, which is probably why eslint can be configured to put the star just about anywhere, with the rules generator-star-spacing and yield-star-spacing. It would be nice to have similar configurability in dprint.
Here's an incomplete list of locations where star spacing would apply:
class A {
public *before();
public* after(); // yes, this is legal
public static *before();
public static* after(); // yes, this is legal
}
const anonymous = function *() {
yield 1;
yield 2;
};
const before = function *before() {
yield *anonymous();
};
const after = function* after() {
yield* anonymous();
};
In my experience most are not consistent about star spacing, some insist the star has to go with the function name function *func() (space before) but then happily write yield* func(); (space after), which happens to be the default setting with eslint.
IMO, dprint currently formats inconsistently as well, e.g. yield* and function* but private *whatever().
The text was updated successfully, but these errors were encountered:
This somewhat duplicates what has been discussed before, but AFAICT has not been succinctly condensed into a feature request before. Most people seem to have a very strong opinion about this, which is probably why eslint can be configured to put the star just about anywhere, with the rules
generator-star-spacing
andyield-star-spacing
. It would be nice to have similar configurability in dprint.Here's an incomplete list of locations where star spacing would apply:
In my experience most are not consistent about star spacing, some insist the star has to go with the function name
function *func()
(space before) but then happily writeyield* func();
(space after), which happens to be the default setting with eslint.IMO, dprint currently formats inconsistently as well, e.g.
yield*
andfunction*
butprivate *whatever()
.The text was updated successfully, but these errors were encountered: