Skip to content

Rule List

Here’s a list of all rules that this plugin provides.

πŸ’Ό Configurations enabled in.
βœ… Set in the recommended configuration.
πŸ“¦ Set in the recommended-publishable configuration.
🎨 Set in the stylistic configuration.
πŸ”§ Automatically fixable by the --fix CLI option.
πŸ’‘ Manually fixable by editor suggestions.

NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Description πŸ’Ό πŸ”§ πŸ’‘
bin-name-casing Enforce that names for bin properties are in kebab case. 🎨 πŸ’‘
exports-subpaths-style Enforce consistent format for the exports field (implicit or explicit subpaths). 🎨 πŸ”§
no-empty-fields Reports on unnecessary empty arrays and objects. βœ… πŸ“¦ πŸ’‘
no-local-dependencies Requires that dependencies do not use local file paths, which will likely result in errors when installing from a registry.
no-redundant-files Prevents adding unnecessary / redundant files. βœ… πŸ“¦ πŸ’‘
no-redundant-publishConfig Warns when publishConfig.access is used in unscoped packages. βœ… πŸ“¦ πŸ’‘
order-properties Enforces that package properties are declared in a consistent order. 🎨 πŸ”§
repository-shorthand Enforce either object or shorthand declaration for repository. βœ… πŸ“¦ πŸ”§
require-attribution Ensures that proper attribution is included, requiring that either author or contributors is defined, and that if contributors is present, it should include at least one contributor. βœ… πŸ“¦ πŸ’‘
restrict-dependency-ranges Restricts the range of dependencies to allow or disallow specific types of ranges. πŸ’‘
restrict-private-properties Disallows unnecessary properties in private packages. πŸ”§ πŸ’‘
restrict-top-level-properties Disallows specified top-level properties in package.json. πŸ’‘
scripts-name-casing Enforce that names for scripts are in kebab case (optionally separated by colons). 🎨 πŸ’‘
sort-collections Selected collections must be in a consistent order (lexicographical for most; lifecycle-aware for scripts). βœ… πŸ“¦ πŸ”§
specify-peers-locally Requires that all peer dependencies are also declared as dev dependencies βœ… πŸ“¦ πŸ’‘
unique-dependencies Checks a dependency isn’t specified more than once (i.e. in dependencies and devDependencies) βœ… πŸ“¦ πŸ’‘
valid-peerDependenciesMeta-relationship Enforces that any dependencies declared in peerDependenciesMeta are also defined in the package’s peerDependencies. βœ… πŸ“¦ πŸ’‘
valid-repository-directory Enforce that if repository directory is specified, it matches the path to the package.json file βœ… πŸ“¦ πŸ’‘

This group of rules allows you to require that the associated top-level property must be present in the package.json.

Name Description πŸ’Ό πŸ”§ πŸ’‘
require-author Requires the author property to be present. πŸ”§
require-bin Requires the bin property to be present.
require-browser Requires the browser property to be present.
require-bugs Requires the bugs property to be present.
require-bundleDependencies Requires the bundleDependencies property to be present.
require-config Requires the config property to be present.
require-contributors Requires the contributors property to be present.
require-cpu Requires the cpu property to be present.
require-dependencies Requires the dependencies property to be present.
require-description Requires the description property to be present. βœ… πŸ“¦
require-devDependencies Requires the devDependencies property to be present.
require-devEngines Requires the devEngines property to be present.
require-directories Requires the directories property to be present.
require-engines Requires the engines property to be present.
require-exports Requires the exports property to be present. βœ… πŸ“¦
require-files Requires the files property to be present. βœ… πŸ“¦
require-funding Requires the funding property to be present.
require-gypfile Requires the gypfile property to be present.
require-homepage Requires the homepage property to be present.
require-keywords Requires the keywords property to be present.
require-libc Requires the libc property to be present.
require-license Requires the license property to be present. βœ… πŸ“¦
require-main Requires the main property to be present.
require-man Requires the man property to be present.
require-module Requires the module property to be present.
require-name Requires the name property to be present. βœ… πŸ“¦
require-optionalDependencies Requires the optionalDependencies property to be present.
require-os Requires the os property to be present.
require-packageManager Requires the packageManager property to be present.
require-peerDependencies Requires the peerDependencies property to be present.
require-peerDependenciesMeta Requires the peerDependenciesMeta property to be present.
require-private Requires the private property to be present. πŸ”§
require-publishConfig Requires the publishConfig property to be present.
require-repository Requires the repository property to be present. βœ… πŸ“¦
require-scripts Requires the scripts property to be present.
require-sideEffects Requires the sideEffects property to be present. βœ… πŸ“¦
require-type Requires the type property to be present. βœ… πŸ“¦ πŸ”§
require-types Requires the types property to be present.
require-version Requires the version property to be present. βœ… πŸ“¦

This group of rules allows you to enforce that the value of the associated top-level property is valid. All of these rules are include in the recommended config.

NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Description πŸ’Ό πŸ”§ πŸ’‘
valid-author Enforce that the author property is valid. βœ… πŸ“¦ πŸ”§
valid-bin Enforce that the bin property is valid. βœ… πŸ“¦
valid-browser Enforce that the browser property is valid. βœ… πŸ“¦
valid-bugs Enforce that the bugs property is valid. βœ… πŸ“¦
valid-bundleDependencies Enforce that the bundleDependencies (also bundledDependencies) property is valid. βœ… πŸ“¦
valid-config Enforce that the config property is valid. βœ… πŸ“¦
valid-contributors Enforce that the contributors property is valid. βœ… πŸ“¦
valid-cpu Enforce that the cpu property is valid. βœ… πŸ“¦
valid-dependencies Enforce that the dependencies property is valid. βœ… πŸ“¦
valid-description Enforce that the description property is valid. βœ… πŸ“¦
valid-devDependencies Enforce that the devDependencies property is valid. βœ… πŸ“¦
valid-devEngines Enforce that the devEngines property is valid. βœ… πŸ“¦
valid-directories Enforce that the directories property is valid. βœ… πŸ“¦
valid-engines Enforce that the engines property is valid. βœ… πŸ“¦
valid-exports Enforce that the exports property is valid. βœ… πŸ“¦
valid-files Enforce that the files property is valid. βœ… πŸ“¦
valid-funding Enforce that the funding property is valid. βœ… πŸ“¦
valid-gypfile Enforce that the gypfile property is valid. βœ… πŸ“¦
valid-homepage Enforce that the homepage property is valid. βœ… πŸ“¦
valid-keywords Enforce that the keywords property is valid. βœ… πŸ“¦
valid-libc Enforce that the libc property is valid. βœ… πŸ“¦
valid-license Enforce that the license property is valid. βœ… πŸ“¦
valid-main Enforce that the main property is valid. βœ… πŸ“¦
valid-man Enforce that the man property is valid. βœ… πŸ“¦
valid-module Enforce that the module property is valid. βœ… πŸ“¦
valid-name Enforce that the name property is valid. βœ… πŸ“¦
valid-optionalDependencies Enforce that the optionalDependencies property is valid. βœ… πŸ“¦
valid-os Enforce that the os property is valid. βœ… πŸ“¦
valid-packageManager Enforce that the packageManager property is valid. βœ… πŸ“¦
valid-peerDependencies Enforce that the peerDependencies property is valid. βœ… πŸ“¦
valid-peerDependenciesMeta Enforce that the peerDependenciesMeta property is valid. βœ… πŸ“¦
valid-private Enforce that the private property is valid. βœ… πŸ“¦
valid-publishConfig Enforce that the publishConfig property is valid. βœ… πŸ“¦
valid-repository Enforce that the repository property is valid. βœ… πŸ“¦
valid-scripts Enforce that the scripts property is valid. βœ… πŸ“¦
valid-sideEffects Enforce that the sideEffects property is valid. βœ… πŸ“¦
valid-type Enforce that the type property is valid. βœ… πŸ“¦
valid-version Enforce that the version property is valid. βœ… πŸ“¦
valid-workspaces Enforce that the workspaces property is valid. βœ… πŸ“¦