Skip to content

Files

Latest commit

 

History

History
31 lines (22 loc) · 510 Bytes

object-shorthand-properties-first.md

File metadata and controls

31 lines (22 loc) · 510 Bytes

Pattern: Wrong shorthand property order

Issue: -

Description

By convention and for better readability, shorthand properties should precede regular property declarations.

Not passing:

let obj = {
  foo: foo,
  bar,
  baz: baz,
};

Passing:

let obj = {
  bar,
  foo: foo,
  baz: baz,
};

Further Reading