Skip to content

Trailing commas in getter patterns #31

@guybedford

Description

@guybedford

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions