millermedeiros / esformatter

ECMAScript code beautifier/formatter
MIT License
970 stars 91 forks source link

Computed method names in class definitions #470

Closed digiwano closed 7 years ago

digiwano commented 7 years ago

See here:

% cat foo.js
const mySym = Symbol('some-symbol');
class Foo {
  [mySym]() {
    return true;
  }
}

% esformatter foo.js

const mySym = Symbol('some-symbol');
class Foo {
  [ mySym]() {
    return true;
  }
}

I haven't been able to find a configuration setting which will disable that space, but even if there is a setting to change this it seems like an odd default behavior