Skip to content

Option to allow one-liner es6 objects #6

Description

@goffreder

It would be nice if the plugin could detect if an object is used with the shorthand es6 syntax and allow for oneliners, maybe up to a number of properties.

Example:

var foo = { a: a } //ok
var foo = { a: a, b: b } // error
var foo = {
  a: a,
  b: b
} // ok

// with max properties = 2
const foo = { a } // ok
const foo = { a, b } // ok
const foo = { a, b, c } // error
const foo = {
  a,
  b,
  c
} // ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions