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 | β π¦ | π‘ |
Require Properties
Section titled βRequire Propertiesβ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. |
β π¦ |
Valid Properties
Section titled βValid Propertiesβ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. |
β π¦ |