Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing commas in getter patterns #31

Closed
guybedford opened this issue Nov 19, 2020 · 0 comments
Closed

Trailing commas in getter patterns #31

guybedford opened this issue Nov 19, 2020 · 0 comments

Comments

@guybedford
Copy link
Collaborator

Spotted by @sokra, getter patterns currently don't detect with trailing commas:

Works:

Object.defineProperty(exports, 'a', {
  enumerable: true,
  get: function () {
    return q.p;
  }
});

Doesn't work:

Object.defineProperty(exports, 'a', {
  enumerable: true,
  get: function () {
    return q.p;
  },
});

This is a trivial fix, but likely misses the cutoff for stability at this point.

These were designed mostly to catch Babel / TypeScript build outputs so in most cases we should be ok without this support though since it would only affect users explicitly writing in this style where it is not generated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant