prefer-property-order | npm-package-json-lint (original) (raw)

Enabling this rule will result in an error being generated if the package.json properties are not in the specified order.

If an empty array is provided (see example below) then the following list will be used as the default sort order.

[
    'name',
    'version',
    'description',
    'keywords',
    'homepage',
    'bugs',
    'license',
    'author',
    'contributors',
    'funding',
    'files',
    'exports',
    'main',
    'module',
    'jsnext:main',
    'types',
    'typings',
    'style',
    'example',
    'examplestyle',
    'assets',
    'bin',
    'man',
    'directories',
    'repository',
    'type',
    'scripts',
    'config',
    'pre-commit',
    'browser',
    'browserify',
    'babel',
    'eslintConfig',
    'stylelint',
    'npmpackagejsonlint',
    'imports',
    'dependencies',
    'devDependencies',
    'peerDependencies',
    'peerDependenciesMeta',
    'bundledDependencies',
    'bundleDependencies',
    'optionalDependencies',
    'overrides',
    'engines',
    'engineStrict',
    'os',
    'cpu',
    'preferGlobal',
    'private',
    'publishConfig',
    'workspaces',
]