/sortpack

Organize your package.json

Primary LanguageTypeScriptGNU Lesser General Public License v3.0LGPL-3.0

sortpack

Organize your package.json

It's like Prettier for your package.json. Inpsired by fixpack, but actively maintained!

Support with PayPal Patreon ko-fi


Installation

npm i -D sortpack

Usage

sortpack

Add to your package.json:

"scripts": {
  "something": "sortpack"
}

Options:

-i [--indent] # one of: 2 4 tab

Use with husky and lint-staged for automated goodness:

npm i -D husky sortpack lint-staged

// add to package.json:
  "lint-staged": {
    "package.json": [
      "sortpack"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },

LICENSE