node-jscs icon indicating copy to clipboard operation
node-jscs copied to clipboard

Spaces in ES2015 object literals

Open lyosha-v opened this issue 11 years ago • 3 comments

In jscs:2.0.0 this code with new ES2015 literal syntax causes an error Missing space before opening round brace.

let obj = {
  method() {
  }
};

And this code causes an error Illegal space after key.

let obj = {
  method () {
  }
};

Are there any rules for this case?

lyosha-v avatar Aug 06 '15 10:08 lyosha-v

Thanks for reporting @verkholantsev. You can specify jscs . --verbose to see the rule that causes the error. I think we have an issue for this already but not sure.

hzoo avatar Aug 06 '15 13:08 hzoo

https://github.com/jscs-dev/node-jscs/issues/1513

kobezzza avatar Aug 06 '15 14:08 kobezzza

Ok closing in favor of #1513.

hzoo avatar Aug 07 '15 17:08 hzoo