jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.96k stars 513 forks source link

requireEnhancedObjectLiterals doesn't work with the set syntax #2201

Closed erikvold closed 8 years ago

erikvold commented 8 years ago

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set

Try on example {set foo(v) {}}, it fails.

markelog commented 8 years ago

Well, that's is incorrect syntax, while from you link, for the case -

var o = {
  set current (str) {
    this.log[this.log.length] = str;
  },
  log: []
}

I don't see any errors, which is what to be expected?