Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 671 Bytes

sort-package-json.md

File metadata and controls

37 lines (24 loc) · 671 Bytes

enforce package.json sorting (sort-package-json)

Use sort-package-json to keep your keys in a predictable order.

Rule Details

This rule aims to enforce sorting.

Examples of incorrect code for this rule:

{
  "name": "foo",
  "version": "1.0.0"
}

Examples of correct code for this rule:

{
  "version": "1.0.0",
  "name": "foo"
}

Options

Same as https://github.com/keithamus/sort-package-json.

When Not To Use It

If you don't like the defaults of sort-package-json, you may not want this rule.

Further Reading

https://github.com/keithamus/sort-package-json