prettier-package-json

  • Version 2.8.0
  • Published
  • 29 kB
  • 9 dependencies
  • MIT license

Install

npm i prettier-package-json
yarn add prettier-package-json
pnpm add prettier-package-json

Overview

Prettier formatter for package.json files

Index

Functions

Type Aliases

Functions

function check

check: (packageJson: string | PackageJson, opts: Options) => boolean;

    function format

    format: (packageJson: PackageJson, opts?: Options) => string;

      Type Aliases

      type Options

      type Options = Partial<{
      useTabs: boolean;
      tabWidth: number;
      expandUsers: boolean;
      enforceMultiple: boolean;
      keyOrder:
      | PackageJsonKey[]
      | ((a: PackageJsonKey, b: PackageJsonKey) => -1 | 0 | 1);
      }>;

        Package Files (2)

        Dependencies (9)

        Dev Dependencies (11)

        Peer Dependencies (0)

        No peer dependencies.

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/prettier-package-json.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/prettier-package-json)
        • HTML
          <a href="https://www.jsdocs.io/package/prettier-package-json"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>